visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Operating Systems :: DOS :: Create a .bat file on NT to run svrmrg23, connect internal and run an alter command


By: Squibi U.S.A.  Date: 04/10/2002 00:00:00  English  Points: 100 Status: Answered
Quality : Excellent
I am running Oracle 7.3.4.5 on NT4.0 and need to create a batch file that will run svrmgr23, then connect as internal and then run a few "alter" statements and then exit.

Whenever I attempt it the batch file stops as soon as SVRMGR23 is started. Can anyone help?
By: VGR Date: 04/10/2002 08:24:00 English  Type : Comment
could you show me your BAT file ?

I suspect that you used CALL which indeed transfers execution control to the called BAT/EXE

There are solutions but I would like to see exactly what you're trying to perform.

Thanks
By: Squibi Date: 04/10/2002 08:53:00 English  Type : Comment
Here is my batch file

@echo off

svrmgr23

connect internal/password

alter tablespace . . . .

exit
exit
By: VGR Date: 04/10/2002 09:09:00 English  Type : Comment
just use CALL batch2

and in batch2.BAT place the line svmgr23

This is the first and simpliest solution I think of.
By: Squibi Date: 07/10/2002 03:32:00 English  Type : Comment
Sorry, I am not sure what you are trying to say.
By: VGR Date: 09/10/2002 20:28:00 English  Type : Answer
main BATch :
@echo off
[...your stuff before the sub-call...]
CALL BATCH2
[...your stuff after the sub-call...]
[ REM you may use the ERRORLEVEL variable to get the passed result from previous call]
^Z

second BATch "BATCH2.BAT"
@echo off
svmgr23
^Z


is that better explained ?
By: Squibi Date: 09/10/2002 21:25:00 English  Type : Comment
This didnt work but I need to close this and am not sure how else to do it. . . .

I was able to get the process to work by having the batch file start svrmgr23 and run an .sql file in the same command line:

svrmgr23 command="C:\test.sql"

And I set up the SQL to log on and run the alter commands.

I wish I could have done this in one file but this works.

Do register to be able to answer

EContact
browser fav
page generated in 344.152930 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page