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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

starting database using script

Status
Not open for further replies.

StickyBit

Technical User
Jan 4, 2002
264
CA
Hi folks,

I'm trying to start my oracle database using the following script located in /etc/rc2.d. The OS is Solaris 8.

#!/bin/sh
#--------------------------------------------------------
# set some environment variables
#--------------------------------------------------------
ORA_HOME=/oracle1/app/oracle/product/8.1.7
ORA_OWNER=oracle
#--------------------------------------------------------
case $1 in
'start')
echo "Starting Database(s)..."
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
echo "Starting Oracle Listener..."
su - $ORA_OWNER -c $ORA_HOME/bin/lsnrctl

<<EOF
start
exit
EOF
;;
'stop')
echo &quot;Stopping Oracle Listener...&quot;
su - $ORA_OWNER -c $ORA_HOME/bin/lsnrctl <<EOF
stop
exit
EOF
echo &quot;Stopping Database(s)...&quot;
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
*)
echo &quot;usage: dbora {start|stop}&quot;
;;
esac

The script works fine when I execute it from the command line, however when the server boots only the LISTNER Daemon is started from the script and not the database. Could this be a permission problem.

By the way, I'm not sure where dbstart and dbshut came from I think they are scripts provided by Oracle.

Sticktbit.


 
dbstart uses /etc/oratab to start all the databases on the system - is yours up to date & correctly configured ?

pkms:/u05/app/oracle/product/8.0.5:Y
test:/u05/app/oracle/product/8.0.5:Y


Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top