Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: NT shutdown

Re: NT shutdown

From: David Sisk <davesisk_at_ipass.net>
Date: Fri, 30 Jul 1999 10:33:05 -0400
Message-ID: <Zyio3.492$tp2.179@news.ipass.net>


Hi:

Yup, this is one of the many limitations of running Oracle on NT. Here's how it works:

When you shutdown NT, the SCuM (Service Control Manager) will stop all services before NT shuts down. The scum will wait 20 seconds for a service to reply that it stopped successfully. If the service doesn't reply within 20 seconds, the scum assumes that it is "hung", and kills the O/S process associated with the service. (There *might* be a registry entry to change this default, I'm not positive. This is a good question, and I'll research it. If I find anything, I'll add the info to my site below, and post a note back here on this newsgroup.) When the scum kills the ORACLEx.EXE O/S process associated with the OracleServiceSID, it is essentially the same thing as doing a SHUTDOWN ABORT, turning the power off, etc.

The OracleServiceSID loads and runs the O/S executable and dll's for the Oracle instance. However, it doesn't actually create and initialize an Oracle instance (like happens on Unix). You do that by either running the necessary startup commands from SVRMGR or by using the ORADIMxx utility. The OracleStartSID will run a STRTSID.CMD (name correct?) file that contains an ORADIMxx statement to start the Oracle instance, assuming you have all the settings correct. (I've never actually gotten this to work absolutely consistently. Has anyone else?) Also, if you have a SHTDNSID.BAT (again, name correct? failing memory...) with the necessary ORADIMxx command to stop the instance (assuming everything is configured correctly), the OracleStartSID will run this BAT file to shutdown the Oracle instance (normal, immediate, or abort, depending on what you specify in the ORADIMxx command) when the OracleStartSID service is stopped (whether manually or during an NT shutdown). Both these should happen whether you issue the NT SHUTDOWN command from a batch script or the O/S scheduler, or someone shuts down NT by pointing-n-clicking. (Again, I've never gotten this to work consistently either.)

The problem arises in that the scum will only wait 20 seconds for the shutdown to occur before killing the ORACLExx.EXE O/S process. Depending on what's going on, a SHUTDOWN IMMEDIATE can take a lot longer than 20 seconds. So, essentially, it's just not reliable enough to work consistently.

Unfortunately, NT doesn't natively provide a way to run startup and shutdown scripts like Unix does. (I understand that Winders2000 will support this capability, though. Has anyone experimented with it?) There is a tool in the NT resource kit that allows you to run a startup script (from which you can call other startup scripts) called AutoEXNT. (Check the RESKIT documentation for details.) We're using this to run SVRMGR and startup after a reboot, and it works much more consistently that the OracleStartSID routine.

There is a third party utility called SHUTDOWN PLUS that will alledgedly detect when an NT shutdown has been issued, and run one or more shutdown CMD files or other utilities. You could use this to run a SHUTDOWN IMMEDIATE script from SVRMGR for the Oracle instance, but I do not know if it suffers from the same 20 second limitation imposed by the scum. We've looked at it, but haven't actually tried it yet. I don't have the URL with me, but search www.microsoft.com for SHUTDOWN PLUS and you'll find it. If you do try it, let me know how/if it works!

Hope this helps.

Regards,

--
David C. Sisk
Need tech info on Oracle? Visit The Unofficial ORACLE on NT site at http://www.ipass.net/~davesisk/oont.htm Like original music? Listen to song samples and buy a CD at http://www.mp3.com/disparityofcult

Gocha Mchedlishvili wrote in message ...
>Hi,
>
>If I shut down NT with database still open, with which option databse is
>closed?
>
>I suspect with -abort option, but I'll appreciate if somebody can give me
>more definite answer.
>
>Thank you
>
>Gocha
>
>
>
Received on Fri Jul 30 1999 - 09:33:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US