Home » RDBMS Server » Enterprise Manager » OEM: black out Target DB from script
OEM: black out Target DB from script [message #531544] Wed, 16 November 2011 13:03 Go to next message
BeefStu
Messages: 192
Registered: October 2011
Senior Member
I have a script that can issue a node-level blackout and code
to remove it.


Add
===
$AGENT_HOME/bin/emctl start blackout $blackout_name -nodelevel 

Drop
====
$AGENT_HOME/bin/emctl status blackout | grep Blackoutname | \
   sed -e "s:.*Blackoutname = ::" -e 's/(.*//' | \
   while  read blackout_name
   do
      $AGENT_HOME/bin/emctl stop blackout $blackout_name 
   done 



Is there a command or code I can use within a shell script
to do the same (add/drop) for only a single Target DB?

Any examples would be greatly appreicated.

Thanks to all who answer
Re: OEM: black out Target DB from script [message #531551 is a reply to message #531544] Wed, 16 November 2011 13:50 Go to previous messageGo to next message
John Watson
Messages: 4514
Registered: January 2010
Location: Global Village
Senior Member
I would use the emcli, examples in the docs:

http://download.oracle.com/docs/cd/E11857_01/em.111/e16185/cli_verb_ref.htm#BABICICB
Re: OEM: black out Target DB from script [message #531555 is a reply to message #531551] Wed, 16 November 2011 14:13 Go to previous messageGo to next message
BeefStu
Messages: 192
Registered: October 2011
Senior Member
This looks like the way to go.. I just can't seem to find
emcli on my system.. Would you know if this is part of the
11g OEM Agent installation? Note, I do have $AGENT_HOME/bin/emctl
Re: OEM: black out Target DB from script [message #531556 is a reply to message #531555] Wed, 16 November 2011 14:18 Go to previous message
John Watson
Messages: 4514
Registered: January 2010
Location: Global Village
Senior Member
Read The Fine Manual.
http://download.oracle.com/docs/cd/E11857_01/em.111/e16185/toc.htm
Previous Topic: Not able to connect to EM through web browser
Next Topic: Unable to apply Monitoring Template on Database Instance
Goto Forum:
  


Current Time: Fri Aug 29 04:03:24 CDT 2014

Total time taken to generate the page: 0.11635 seconds