dbora script not executing all startup processes
441858Aug 3 2007 — edited Aug 8 2007Hi,
I am running Oracle10gR2 on RHEL4. I am having issues with my dbora script. I read quite a few of the posts about it and most people were having similar issues as me. However, I was still not able to get it to work properly. I am going to paste my dbora script and all the other things that I am suppose to do like edit the /etc/oratab file. The main problem I am having is that not all the process that need to be started are starting up. I've been messing around with the /etc/rc.d/init.d/rc.2..rc.3...rc.4...etc files and trying different combinations and they all give me different results. However, the one thing that never starts up is the database. I can get the listener to work and sometimes http server also, but never the database. And another weird thing is that when I check the logs (/var/log/boot.log) it says that the opmn process, for example, has been started, but when I check the status it is down. Here is how things look now.
The /etc/oratab file
------------------------
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
FPRCQA:/opt/app/oracle/product/10.2.0/db_1:Y#
# *:/opt/app/oracle/product/10.2.0/http_1:N
*:/opt/app/oracle/product/10.2.0/http_1:N
--------------------------------------
-- The /etc/rc.d directory
----------------------------------------
/etc/rc.d/rc4.d/S99dbora
/etc/rc.d/rc4.d/K01dbora
/etc/rc.d/rc3.d/S99dbora
/etc/rc.d/rc3.d/K01dbora
/etc/rc.d/rc5.d/S99dbora
/etc/rc.d/rc5.d/K01dbora
/etc/rc.d/rc1.d/K01dbora
/etc/rc.d/rc2.d/S99dbora
/etc/rc.d/rc2.d/K01dbora
/etc/rc.d/rc6.d/K01dbora
/etc/rc.d/rc0.d/K01dbora
---------------------------
-- The dbora script
----------------------------
#!/bin/bash
#
# chkconfig: 35 99 10
# description: Starts and stops Oracle processes
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
#
ORA_DB_HOME=/opt/app/oracle/product/10.2.0/db_1
ORA_HTTP_HOME=/opt/app/oracle/product/10.2.0/http_1
ORA_OWNER=oracle
ORA_LSNR=LSNR_FPRCQA
case "$1" in
'start')
# Start the TNS Listener
su - $ORA_OWNER -c "$ORA_DB_HOME/bin/lsnrctl start $ORA_LSNR"
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c $ORA_DB_HOME/bin/dbstart
# Start the Intelligent Agent
if [ -f $ORA_DB_HOME/bin/emctl ]; then
su - $ORA_OWNER -c "$ORA_DB_HOME/bin/emctl start agent"
elif [ -f $ORA_DB_HOME/bin/agentctl ]; then
su - $ORA_OWNER -c "$ORA_DB_HOME/bin/agentctl start"
else
su - $ORA_OWNER -c "$ORA_DB_HOME/bin/lsnrctl dbsnmp_start"
fi
# Start Management Server
if [ -f $ORA_DB_HOME/bin/emctl ]; then
su - $ORA_OWNER -c "$ORA_DB_HOME/bin/emctl start dbconsole"
elif [ -f $ORA_DB_HOME/bin/oemctl ]; then
su - $ORA_OWNER -c "$ORA_DB_HOME/bin/oemctl start oms"
fi
# Start HTTP Server
if [ -f $ORA_HTTP_HOME/opmn/bin/opmnctl ]; then
su - $ORA_OWNER -c "$ORA_HTTP_HOME/opmn/bin/opmnctl start"
su - $ORA_OWNER -c "$ORA_HTTP_HOME/opmn/bin/opmnctl startproc -ias_component=HTTP_Server"
fi
# Start iSQL*Plus
if [ -f $ORA_HTTP_HOME/bin/isqlplusctl ]; then
su - $ORA_OWNER -c "$ORA_DB_HOME/bin/isqlplusctl start"
fi
touch /var/lock/subsys/dbora
;;
'stop')
# Stop iSQL*Plus
if [ -f $ORA_DB_HOME/bin/isqlplusctl ]; then
su - $ORA_OWNER -c "$ORA_DB_HOME/bin/isqlplusctl stop"
fi
# Stop HTTP Server
if [ -f $ORA_HTTP_HOME/opmn/bin/opmnctl ]; then
su - $ORA_OWNER -c "$ORA_HTTP_HOME/opmn/bin/opmnctl stopall"
fi
# Stop the TNS Listener
su - $ORA_OWNER -c "$ORA_DB_HOME/bin/lsnrctl stop $ORA_LSNR"
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c $ORA_DB_HOME/bin/dbshut
rm -f /var/lock/subsys/dbora
;;
esac
# End of script dbora
exit 0
I would also appreciate if someone could tell me how these rc.2 execute and what order.
Thank you all.