Home » RDBMS Server » Enterprise Manager » automate to start the grid control agent when the host boxes reboot. (SOLARIS, Oracle 10g.)
automate to start the grid control agent when the host boxes reboot. [message #299020] Fri, 08 February 2008 11:26 Go to next message
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 #299025 is a reply to message #299020] Fri, 08 February 2008 11:52 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Add a line for starting the agent in the system startup/shutdown scripts.

Check Automating Database Startup and Shutdown.
Re: automate to start the grid control agent when the host boxes reboot. [message #299032 is a reply to message #299025] Fri, 08 February 2008 12:24 Go to previous messageGo to next message
geeklol
Messages: 59
Registered: March 2005
Member
where are these files located on a solaris box?
Re: automate to start the grid control agent when the host boxes reboot. [message #299044 is a reply to message #299032] Fri, 08 February 2008 13:09 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Scroll down until point 3.

Regards
Michel
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 Go to previous messageGo to next message
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
Re: automate to start the grid control agent when the host boxes reboot. [message #299073 is a reply to message #299068] Fri, 08 February 2008 19:22 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
You need to ensure that the appropriate ORACLE_HOME value is set in the script, then you would include the following line to start the agent:

"$ORACLE_AGENT_HOME/bin/emctl start agent" &

and a corresponding stop command:

"$ORACLE_AGENT_HOME/bin/emctl stop agent" &

geeklol wrote on Fri, 08 February 2008 16:35
... and the ASM instance automation upon reboot?

I thought you indicated that the database and ASM start on their own already?
Re: automate to start the grid control agent when the host boxes reboot. [message #299126 is a reply to message #299020] Sat, 09 February 2008 14:16 Go to previous message
geeklol
Messages: 59
Registered: March 2005
Member
Thank you very much!
Previous Topic: On system startup Oracle Instance is not getting started
Next Topic: error at em console
Goto Forum:
  


Current Time: Sun Dec 04 00:40:04 CST 2016

Total time taken to generate the page: 0.04925 seconds