Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: win2k system shutdown scripts--suitable for db shutdown?
Hello,
> Finally, to answer your question, a workaround provided to me by OSS is
> to use the Group Policy Editor to have Win2K run a VBS script during a
> server shutdown. The code provided is:
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> Return=WshShell.Run("sqlplus ""shutdownusr/passwordl as sysdba""
> @C:\orashut",
> 1, true)
>
> I received the code only yesterday and as yet haven't tested it. As I
> would rather not have a password held in a text file on the server, I
> first plan to test the use of the GP shutdown script with the 'net stop'
> command (as described above) as this works correctly interactively and
> obviates the need for a user id and password to stored in a file.
>
I have finally gotten around to testing the above scripting solution to ensure that the database was shutdown cleanly during a server shutdown / reboot.
My VBS script simply contains the following:
intShellExitCode = objShell.Run("net stop oracleservicelive", 0, vbTrue)
This works reliably and, provided the various registry parameters have been set accordingly, the database is shutdown cleanly by the SCM.
> BTW, in case it's useful, it is possible to encode portions of a windows
> script file. See, e.g.,
>
> <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/h
> tml/seusingscriptencoder.asp>
>
> (pls watch for wrap).
>
Many thanks Roy - the script encoder provided me with what I needed.
--- nigel. -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Nigel Cemm INET: n.cemm_at_dial.pipex.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Apr 21 2003 - 16:17:06 CDT
![]() |
![]() |