automate to start the grid control agent when the host boxes reboot. [message #299020] |
Fri, 08 February 2008 11:26 |
geeklol
Messages: 59 Registered: March 2005
|
Member |
|
|
Hi all,
When my host box reboots, all my db instances and the ASM instance comes back up on it's own, which is great.
But my emctl agent does not. what do i need to do, so that when the host boxes reboot, the emctl agent starts on it's own vs my having to manually start the agent?
Thank you,
|
|
|
|
|
|
Re: automate to start the grid control agent when the host boxes reboot. [message #299068 is a reply to message #299044] |
Fri, 08 February 2008 15:35 |
geeklol
Messages: 59 Registered: March 2005
|
Member |
|
|
THANK YOU VEYR MUCH. but that only stops are starts the db instances. What about the emctl agent automation upon reboot and the ASM instance automation upon reboot?
I made the following changes per your advise but that only starts the db instances.
Change:
under Initialization File Directory, /etc/init.d Create a file called dbora with the following contents, #! /bin/sh -x # # Change the value of ORACLE_HOME to specify the correct Oracle home # directory for your installation.
ORACLE_HOME=/usr/local/oracle/product/10.2.0
#
# Change the value of ORACLE to the login name of the # oracle owner at your site.
#
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
#
if [ ! "$2" = "ORA_DB" ] ; then
if [ "$PLATFORM" = "HP-UX" ] ; then
remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"
exit
else
rsh $HOST -l $ORACLE $0 $1 ORA_DB
exit
fi
fi
#
case $1 in
'start')
$ORACLE_HOME/bin/dbstart $ORACLE_HOME &
;;
'stop')
$ORACLE_HOME/bin/dbshut $ORACLE_HOME &
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
esac
#
exit
------
Change the group of the dbora file to the OSDBA group (typically dba), and set the permissions to 750:
# chgrp dba dbora
# chmod 750 dbora
---------
Create symbolic links to the dbora script in the appropriate run-level script directories as follows:
# ln -s /etc/init.d/dbora /etc/rc3.d/K01dbora # ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora
|
|
|
|
|