Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Solaris 2.6 startup/shutdown scripts
7.3.x versions of dbstart/dbshut only included support for sqldba which
was EOL'd. If you intend to link this to /etc/rc0.d/K00dbora, beware that
dbshut does a normal shutdown which will wait for users to disconnect.
You might consider changing that to shutdown immediate.
John
groenveld_at_acm.org
#!/sbin/sh
# /etc/init.d/dbora to be linked to /etc/rc3.d/S99dbora- JDG 19960623
#
# Set ORA_HOME to be equivalent to the ORACLE_HOME from
# which you wish to execute dbstart and dbshut
# set ORA_OWNER to the user id of the owner of the
# database in ORA_HOME.
ORA_HOME=/home/hostname.1/oracle/product/7.2.3
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ] then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
#Start the oracle database:
# cleans up lock files for SQLNet in case of shutdown if [ -f /var/tmp/o/* ]; then rm -f /var/tmp/o/s* fi su - $ORA_OWNER -c $ORA_HOME/bin/dbstart su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" ;; 'stop') # Stop the Oracle databases: su - $ORA_OWNER -c $ORA_HOME/bin/dbshut su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" ;;