Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle shutdown

Status
Not open for further replies.
Apr 13, 2004
316
US
My Oracle databases on Solaris 9 are not coming down cleanly. If I execute the script manually it stops the databases, but if it runs as part of a reboot, it executes the script but isn’t shutting down the databases before the server shuts down.

In the /sbin/rc6 script it does a killall, but shouldn’t that wait until the databases are down, since the script in rc0.d is still executing? It seems the killall is getting ran even though the Oracle dbshut is running and it is still connected internally. However, some of the databases take longer to stop than others.

Any ideas for stopping Oracle on Solaris? I have no problems with AIX and Oracle shutting down.

Thanks.
 
Post the shutdown script and the command you are using to shutdown.
 
If it's of any help, we have the following arrangement:

as /etc/rc2.d/S99oracle:

#!/bin/sh
ORACLE_HOME=/oracle/product/817
export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin
export PATH
#Open Oracle Databases
su oracle -c $ORACLE_HOME/bin/dbstart
#Start listener
su oracle -c "$ORACLE_HOME/bin/lsnrctl start"

and as /etc/rc0.d/K01oracle:

#!/bin/sh
# Amend $ORACLE_HOME/bin/dbshut to do shutdown immediate.
# Amend ORACLE_HOME.
ORACLE_HOME=/oracle/product/817
export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin
export PATH
#Close Oracle Databases
su oracle -c $ORACLE_HOME/bin/dbshut
#Stop Listener
su oracle -c "$ORACLE_HOME/bin/lsnrctl stop"

Hope this helps.

 
workaround: add a
sleep 60
to /etc/rc0.d/K01oracle to shutdown save...

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Originally, I was calling a script a DBA created called “stoporacle” which in turn had “su – oracle –c “…dbshut” in it.

My theory is that when running a shutdown the script in rc0.d was running “stoporacle” which had a PID, and when stoporacle runs the commands dbshut, etc., it creates a new PID and the stoporacle script which is finished exits. Since the script in rc0.d is finished then it continues and runs the killall to finish shutting down the server.

I need to wait for the DBA to get in, however, to test my theory, I put the dbshut, etc., inside the rc0.d script to shutdown oracle, which should work (hopefully) because it will no longer be executing other scripts that will create child processes.

That is my theory and I will inform you of my findings.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top