I am having problems writing instance shutdown script for Oracle 8.1.6 on NT. I need to create BAT file which we can use in AT schedule to shutdown and startup oracle.
Could anybody help me on this?
Printable View
I am having problems writing instance shutdown script for Oracle 8.1.6 on NT. I need to create BAT file which we can use in AT schedule to shutdown and startup oracle.
Could anybody help me on this?
not a problem
in the batch file call
svrmgrl @your sql file path
in the sqlfile
connect internal oracle
shutdown immediate
you can schedule (at) this batch file from nt.
there is also a shutdown.exe available in windows that shutsdown the computer and restarts it, that we use to get rid of temp files and memory leaks along with our normal weekly database shutdowns for coldbackups. and all this is scheduled.
batch file is like
svrmgrl @sql for shutdown and copying all files using os
shutdown and restart the computer
oracle starts up again when system re starts.
Well, first you would want a command file and then a .bat file to call the command file. (does that sound correct?)
so, your command file will have lines SOMETHING like this:
"svrmgrl
connect internal
shutdown immediate
(maybe a cold backup after that?!)
startup
exit
"
you could even spool to a LOG so you see what it's doing.
then, your .bat file would look something like this:
"c:\winnt\system32\cmd.exe
d:
cd
"
Of course, on NT it would be simpler to create a shortcut for the command (.cmd) file and then use NT-Scheduler or something to run it whenever you want ...
uh, anyone care to edit anything I stated? I was only giving a rough example.
- Magnus