[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference eps::oracle

Title:Oracle
Notice:For product status see topics: UNIX 1008, OpenVMS 1009, NT 1010
Moderator:EPS::VANDENHEUVEL
Created:Fri Aug 10 1990
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1574
Total number of notes:4428

1556.0. "dbshut hangs with init 0" by BRSADV::BUGGENHOUT () Wed Apr 30 1997 12:16

hoi

I created a start/stop script in rc directories (contents following) for
use with OPS. Therefore I modified dbstart with the 'startup parallel'
command, the dbshut script is not modified. I get problems when I execute
the script with shutdown command init 0 while it is working fine on the
command line. The start at boot time goes OK.

# su - oracle -c dbshut

		works fine


# /sbin/init.d/oracle stop

		works fine too

# init 0

the script is hanging; with some debugging (sh -x) i can see it reaches
the dbshut and does the 	svrmgrl
				connect internal  (says connected)
				shutdown   (not shown : hangs)

the oracle shutdown command is not executed as the db processes are still
there and the only way is to kill the oracle script and then the init 0
proceeds

As the script works manually I do not see what can be the problem.
Any idea ?

regina

The /sbin/init.d/oracle script :
#!/bin/sh
#
ORACLE_HOME=/usr/app/oracle/product/7.3.2
PATH=$PATH:$ORACLE_HOME/bin
ORACLE_SID=TC0
HOST=`hostname`
ORACLE=oracle
export ORACLE_HOME ORACLE_SID PATH HOST ORACLE


LOG=$ORACLE_HOME/startup.log
touch $LOG
chmod a+r $LOG


case $1 in 
'start')
        chown oracle.dba /dev/rdrd/drd*
        echo "$0:starting up">> $LOG
        date >> $LOG
        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 DB"
        su - oracle -c $ORACLE_HOME/bin/dbstart >>$LOG 2>&1
        ;;
'stop')
        echo "$0: shutting down" >>$LOG
        date >> $LOG
        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 DB"
        su - oracle -c $ORACLE_HOME/bin/dbshut >>$LOG 2>&1
        ;;
*)
        echo "usage : $0 {start|stop}"
        exit
        ;;
esac

exit


T.RTitleUserPersonal
Name
DateLines
1556.1one thing to checkALFAM7::GOSEJACOBMon May 05 1997 05:226
    re .0
    What is your /sbin/init.d/oracle sym-linked to in /sbin/rc0.d? It
    should be something like K00oracle to make sure that Oracle is shut
    down before anything else is stopped.
    
    	Martin
1556.2OKBRSADV::BUGGENHOUTMon May 05 1997 07:028
thanks, I had put the script as K01oracle after K00enlogin, K01ase and
K01cluster and probavly already killed something I need.
After moving the script to K00oracle everything works fine.
Just needed your reply to do this final test

Thanks

regina