Shutdown scritp on NT
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Shutdown scritp on NT

  1. #1
    Join Date
    Nov 2000
    Posts
    57
    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?

  2. #2
    Join Date
    Mar 2001
    Posts
    61
    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.






  3. #3
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378

    Wink



    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width