From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078611110306.tru64-unix-managers.marc@archive.invalid> From: Karen Thomas Date: Wed, 09 Apr 1997 14:28:27 +0000 To: tru64-unix-managers Subject: SUMMARY: Shutting down DU with Oracle wrt rc?.d scripts X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078611110306 Managers, Summary is two fold. Original question is at the bottom. 1> Do not use shutdown command use the init command instead. The shutdown command will not stop the processes in the /sbin/rc?.d directories it will not wait for them to finish it will just halt the processor. Do a man on init to find the correct method. Thanks to Brenden Phillips and Matthew Calthrop for the note about that: Mathew's note: Another point to note: the "shutdown" program does not actually wait for the kill scripts (/sbin/rc*.d/K*) to finish before shutting down. It is generally a better policy to use "init 0", which does wait. -------------------------------------------------------------------------- 2> In the Oracle Installation book there is a script you can copy and put into /sbin/init.d/oracle this script will be called from /sbin/rc0.d to shutdown the databases and /sbin/rc3.d to start up the databases and Oracle. Many people sent attachments and advice, I will only include the ones that I used: To create the /sbin/init.d/oracle script: Matthew Calthrop : #!/bin/sh # ### 14/06/96 MJC Commented out start/stop of sql*net v1. ORACLE_HOME=/oracle/product/v716 PATH=${PATH}:$ORACLE_HOME/bin HOST=`hostname` ORACLE=oracle export ORACLE_HOME PATH ORACLE=oracle LOG=$ORACLE_HOME/startup.log touch $LOG chmod a+r $LOG # case $1 in 'start') echo "$0: starting up..." >> $LOG date >> $LOG # Start sql*net v1 ### 14/06/96 MJC - commented out, as we don't use it. #if [ -f $ORACLE_HOME/bin/orasrv ] ; #then # echo "starting v1 listener..." # su $ORACLE -c "$ORACLE_HOME/bin/tcpctl start forkon timeout 10" >> \ # $LOG 2 >&1 #fi # Start sql*net v2 if [ -f $ORACLE_HOME/bin/tnslsnr ] ; then echo "starting V2 listener..." su $ORACLE -c "$ORACLE_HOME/bin/lsnrctl start" >> \ $LOG 2>&1 fi echo "Starting Oracle databases..." su $ORACLE -c "$ORACLE_HOME/bin/dbstart" >> $LOG 2>&1 ;; 'stop') echo "$0: shutting down..." >> $LOG date >> $LOG #Stop v1 listener ### 14/06/96 MJC - commented out, as we don't use it. #if [ -f $ORACLE_HOME/bin/orasrv ] ; #then # echo "Stopping V1 listener..." # su $ORACLE -c "$ORACLE_HOME/bin/tcpctl stop" >> $LOG 2>&1 #fi #Stop V2 listener if [ -f $ORACLE_HOME/bin/tnslsnr ] ; then echo "Stopping V2 listener..." su $ORACLE -c "$ORACLE_HOME/bin/lsnrctl stop" >> $LOG 2>&1 fi echo "Stopping Oracle databases" su $ORACLE -c "$ORACLE_HOME/bin/dbshut" >> $LOG 2>&1 ;; *) echo "usage: $0: {start | stop}" exit ;; esac # exit To create the links: Dejan Muhamedagic : There should be an example S??oracle and K??oracle scripts: in fact it's the same script accepting "start" and "stop" arguments. In general you put a script (not a link) into /sbin/init.d (say /sbin/init.d/oracle), then you make appropriate links in /sbin/rc0.d and /sbin/rc3.d (or rc2.d) like this: cd /sbin/rc0.d; ln -s ../init.d/oracle K00oracle cd /sbin/rc3.d; ln -s ../init.d/oracle S99oracle You have to check permissions for the script after you install it. In general, the numbers should be low for K link and high for S link, because you want to start it after everything and kill it first. Original question: =Managers, = The other I shut our DU box down using shutdown -now with our new =Oracle Database freshly installed. I asked our DBA what commands are =needed to shut and restart oracle along with the system, so that it is =included into the rcx.d directory. She told me to use the commands dbshut =and dbstart to start and stop Oracle. = = My question is what do I do with these scripts? Do I just put =a symbolic link to these into the /sbin/rc3.d directory with a name like =S62oracle and that would do it? Do I move the files right into the =directory? Do I have to write some kind of other scrip to call these two =scripts? = = I tried searching many sites and it seems like either it is a very =easy or a very hard question to answer. I've seen answers like "these =scripts should be incorporated into the rc?.d scripts" What does that mean =incorporated? = = To me it seems like a basic answer - but if it is much more =complicated than that then could someone point me in a direction? Thanks also to: Ruben Zelwer Guy Dallaire Casey Spangler Brenden Phillips "Nagaraja, Raja" Kurt Carlson "Callahan, Drake" Kris Chandrasekhar James Anderson Randy Rodgers Dejan Muhamedagic "Thomas.Meyer" "Matthew Calthrop" ------------------------------------------------------------------------------ Karen Thomas Connecticut State University System Office Information System THOMASK@CTSTATEU.EDU PHONE: (860) 493-0118