Controlling Blackouts Using the Command Line Utility
You can control blackouts from the Oracle Enterprise Manager Console or from the Enterprise Manager command line utility (emctl
). However, if you are controlling target blackouts from the command line, you should not attempt to control the same blackouts from the Enterprise Manager console. Similarly, if you are controlling target blackouts from theEnterprise Manager console, do not attempt to control those blackouts from the command line.
From the command line, you can perform the following blackout functions:
-
Starting Immediate Blackouts
-
Stopping Immediate Blackouts
-
Checking the Status of Immediate Blackouts
Note:
When you start a blackout from the command line, any Enterprise Manager jobs scheduled to run against the blacked out targets will still run. If you use the Enterprise Manager Console to control blackouts, you can optionally prevent jobs from running against blacked out targets.
To use the Enterprise Manager command-line utility to control blackouts:
Table 8-2 Summary of Blackout Commands
Blackout Action | Command |
---|---|
Set an immediate blackout on a particular target or list of targets |
Be sure to use a unique name for the blackout so you can refer to it later when you want to stop or check the status of the blackout. The
If you do not specify a target or list of targets, Enterprise Manager will blackout the local host target. All monitored targets on the host are not blacked out unless a list is specified or you use the If two targets of different target types share the same name, you must identify the target with its target type. |
Stop an immediate blackout |
|
Set an immediate blackout for all targets on a host |
The |
Check the status of a blackout |
Use the following examples to learn more about controlling blackouts from the Enterprise Manager command line:
-
To start a blackout called "bk1" for databases "db1" and "db2," and for Oracle Listener "ldb2," enter the following command:
$PROMPT> emctl start blackout bk1 db1 db2 ldb2:oracle_listener -d 5 02:30
The blackout starts immediately and will last for 5 days 2 hours and 30 minutes.
-
To check the status of all the blackouts on a managed host:
$PROMPT> emctl status blackout
-
To stop blackout "bk2" immediately:
$PROMPT> emctl stop blackout bk2
-
To start an immediate blackout called "bk3" for all targets on the host:
$PROMPT> emctl start blackout bk3 -nodeLevel
-
To start an immediate blackout called "bk3" for database "db1" for 30 minutes:
$PROMPT> emctl start blackout bk3 db1 -d 30
-
To start an immediate blackout called "bk3" for database "db2" for five hours:
$PROMPT> emctl start blackout bk db2 -d 5:00