Unix/Linux Go Back    



How to start Oracle database automatically

Solaris




Kindly Note - This is a Single User Post by Forum Member RTM Regarding:
How to start Oracle database automatically.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old Unix and Linux 03-24-2005   -   Original Discussion by greg0320
RTM's Unix or Linux Image
RTM RTM is offline Forum Advisor  
Registered User
 
Join Date: Apr 2002
Last Activity: 16 August 2017, 7:13 PM EDT
Location: On my motorcycle
Posts: 3,093
Thanks: 1
Thanked 34 Times in 9 Posts
This works on one of the servers running Oracle - you may have to change it to suit your needs.


Code:
#!/bin/sh
ORA_HOME=/u01/app/oracle/product/8.0.5
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo "Oracle startup: annot start"
exit
fi
case "$1" in
  'start')
# start Oracle databases
su - oracle -c $ORA_HOME/bin/dbstart
su - oracle -c "$ORA_HOME/bin/lsnrctl start "
;;
'stop')
# stop Oracle databases
su - oracle -c "$ORA_HOME/bin/lsnrctl stop "
su - oracle -c $ORA_HOME/bin/dbshut
;;
esac