November 24, 2012

Database BLACKOUT

OEM BLACKOUT
------------

 
OEM ->
Targets ->
enter the target dbhost name ->
select blackout ->
enter blackout name ->
select the reason ->
select add(if required to add more) ->
select all ->
next ->
select immediatetime from & select end time ->
next

 To know the particular database is configured with OEM or not:
-------------------------------------------------------------

echo $AGENT_HOME
/u01/app/oracle/product/agent10g/

cd $AGENT_HOME/bin
./emctl config agent listtargets


To check the status of all the blackouts on a host:
--------------------------------------------------

./emctl status blackout


To set a blackout for all targets/databases on a host:
-----------------------------------------------------

emctl start blackout <Blackoutname> [-nodeLevel] [-d <Duration>]

"-nodeLevel" tells the agent to stop monitoring all targets on the server.
"-d Duration" allows you to set a duration in the format of [days] hh:mm.

cd $AGENT_HOME/bin
./emctl start blackout alltargets_onserver –nodeLevel----->Blackout entire host indefinitely
<Perform Maintenance Tasks>

To stop blackout "alltargets_onserver" immediately:
--------------------------------------------------

cd $AGENT_HOME/bin
./emctl stop blackout alltargets_onserver


To set a blackout for a database on a host:
------------------------------------------

emctl start blackout <Blackoutname> [<Target_name>:<Target_Type>]…. [-d <Duration>]

"-nodeLevel" tells the agent to stop monitoring all targets on the server.
"-d Duration" allows you to set a duration in the format of [days] hh:mm.

cd $AGENT_HOME/bin
./emctl start blackout Blackoutname database1 -d 6:00
<Perform Maintenance Tasks>

To stop blackout "Blackoutname" immediately:
-------------------------------------------

./emctl stop blackout Blackoutname

To get the help menu for emctl
------------------------------

emctl blackout


Examples:
--------

To start an immediate indefinite blackout called "Blackoutname" for all targets on the host:
./emctl start blackout Blackoutname -nodeLevel

To start an immediate blackout called "Blackoutname" for all targets on the host  for 6 hours:
./emctl start blackout Blackoutname -nodeLevel -d 06:00

To start an immediate blackout called "Blackoutname" for database "database1" for 30 minutes:
./emctl start blackout Blackoutname database1 -d 30

To start an immediate blackout called "Blackoutname" for database "database2" for 6 hours:
./emctl start blackout Blackoutname database2 -d 6:00

To start an immediate blackout called "Blackoutname" for databases "database1","database2" and listener "listener1" which will last for 5 days 3 hours and 30 minutes.
./emctl start blackout Blackoutname database1 database2 listener1:oracle_listener -d 5 03:30

No comments:

Post a Comment