Monday, June 12, 2006


Automatic Startup Shutdown Oracle 10g R2 (10.2.0.1)
database utilizing ASM on CentOS 4.3 (RHEL AS 4 U 3)



In general we follow Jeff Hunter [1].However, scripts starting ASM databases are not just like in [1] due to different ORACLE_HOME's directories for ASM instance and database utilizing ASM in case of 10g R2 version of server. In 10.2.0.1 case script /etc/init.d/dbora doesn't export any ORACLE_HOME value.
It just runs script in ~oracle directory responsible for export right ORACLE_HOME value at right time
1. Follow [1] and make changes to /etc/inittab



Original /etc/inittab file:



(...)
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
(...)
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null




Modified /etc/inittab file:



(...)
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
(...)




2.Create file /etc/init.d/dbora:



SLEEP_TIME=180
ORACLE_OWNER=oracle

case "$1" in
start)
sleep $SLEEP_TIME
su - $ORACLE_OWNER -c "/home/oracle/dbStart"
touch /var/lock/subsys/dbora
;;

stop)
su - $ORACLE_OWNER -c "/home/oracle/dbStop"
rm -f /var/lock/subsys/dbora
;;

*)
echo $"Usage: $prog {start|stop}"
exit 1
esac
exit




3.Script ~oracle/dbStart:



export ORACLE_HOME=/u01/app/oracle/product/10.2.0/ASM
lsnrctl start
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_2
lsnrctl start
$ORACLE_HOME/bin/dbstart
$ORACLE_HOME/bin/isqlplusctl start
$ORACLE_HOME/bin/emctl start dbconsole




4.Script ~oracle/dbStop:



export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_2
$ORACLE_HOME/bin/isqlplusctl stop
$ORACLE_HOME/bin/emctl stop dbconsole
$ORACLE_HOME/bin/dbshut
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_2
lsnrctl stop
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/ASM
lsnrctl stop




5.Creating symbolic links for /etc/init.d/dbora:



# ln -s /etc/init.d/dbora /etc/rc5.d/S99dbora
# ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
# ln -s /etc/init.d/dbora /etc/rc6.d/K10dbora




6. System restart.


References.


"Installing Oracle10g Release 1 (10.1.0) on
Linux-(RHEL 4)" at http://www.idevelopment.info
by Jeff Hunter

Saturday, June 03, 2006


One more independent opinion regarding discussed issue.


At mean time on OTN front page you may view:-








Friday, June 02, 2006


"Searching for Timm Hall's Quote"


Searching for "ASM and the database can share a single Oracle home"




Searching for just "single"




Searching for quote mentioned by myself