db auto start in linux
The_RockApr 14 2009 — edited Apr 15 2009I m new to Linux, I want to configure that database should be automatically restarted as Linux Server starts.
I have created dbora (/etc/initd/dbaora) with root user, and it has following contents, but I get below issues.
-----------------------------------------------------------------
ORA_HOME=/data1/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
;;
'stop')
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
;;
esac
--------------------------------------------------------
chmod 750 /etc/init.d/dbora
chkconfig --level 345 dbora on
service dbora does not support chkconfig
-------------------------------------------------------