Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Solaris/Oracle startup script how-to?
In article <8nrqel$tfv$1_at_nnrp1.deja.com>,
iztoku_at_my-deja.com wrote:
> How do you properly start/shut down instances of oracle on Solaris
> (2.6) box? And listener?
>
> Any /etc/init.d script examples?
Here's the 'dbora' script that I'm using in my TEST ENVIRONMENT. Your mileage may vary. It leverages the $ORACLE_HOME/bin/dbstart script, and requires startup/shutdown links, as follows:
# ls -dl /etc/init.d/*dbora* /etc/rc?.d/*dbora* | sed -e 's/^.*1999 //'
/etc/init.d/dbora /etc/rc0.d/K15dbora -> ../init.d/dbora /etc/rc1.d/K15dbora -> ../init.d/dbora /etc/rc2.d/S99dbora -> ../init.d/dbora
### Next line begins the '/etc/init.d/dbora' script #!/bin/sh
ORACLE_OWNER=oracle
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/8.1.5
export ORACLE_HOME
if [ ! -f $ORACLE_HOME/bin/dbstart ]; then
echo "ORACLE startup: cannot start"
exit
fi
case "$1" in
'start')
echo "Starting Oracle instances..." &&
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart & echo "Starting Oracle listeners..." &&
su oracle -c "$ORACLE_HOME/bin/lsnrctl start"
;;
'stop')
echo "Stopping Oracle listeners..." &&
su oracle -c "$ORACLE_HOME/bin/lsnrctl stop"
#Stop the Oracle Database
echo "Stopping Oracle instances..." &&
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut &
;;
*)
echo "Usage: /etc/init.d/dbora { start | stop }"
;;
esac
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Sep 05 2000 - 16:39:09 CDT