Database doesn't shutdown during shutting down the server
Dear Friends ,
I have to use the following dcript to use Auto startup and shutdown my Oracle Database in RHEL 4 .
step 1:
#!/bin/bash
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# Set ORACLE_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORACLE_OWNER to the user id of the owner of the
# Oracle database in ORACLE_HOME.
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
ORACLE_OWNER=oracle
if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
;;
esac
step 2:
cat /etc/inittab
*:/u01/app/oracle/product/10.2.0/db_1:N
orcl:/u01/app/oracle/product/10.2.0/db_1:Y
step 3:
Keep "dbora" in following path :
/etc/rc.d/rc3.d/dbora
/etc/rc.d/rc5.d/dbora
/etc/rc.d/init.d/dbora
And also ,
chmod 750 /etc/init.d/dbora
chkconfig --level 345 dbora on
Now ,The script works fine and ORacle Database and Listener service starts automatically during startup the server .But during shutdown the server, I cannot understand or can't recognize that the Oracle Database & listener service are shutdown auto . I think it does not work properly..... So i need to know that Oracle Database & listener service are stop automatically during shutting down the server . Using the above scripts , How can I do it ? Is there any wrong then plz advice me .......Thx ...
|