Database Reference
In-Depth Information
Filtering and parsing to determine the final variable string runs through this sequence:
1.
Get a list of all targets of a type with oracle% in the name.
2.
Grep that list for targets matching acme_qa .
3.
Grep that shorter list for oracle_databases .
4.
Cut the list by delimiting on the comma and returning the fourth value.
Step 1: List of all targets with “oracle%” in their name
Status ID,Status,Target Type,Target Name
1,Up,oracle_emd,acme_dev:3872
1,Up,oracle_emd,acme_qa:2480
1,Up,oracle_emd,acme_prod:3872
1,Up,oracle_database,amce_dev
1,Up,oracle_database,acme_qa
1,Up,oracle_database,acme_prod
1,Up,oracle_listener,lsnracmedev
1,Up,oracle_listener,lsnracmeqa
1,Up,oracle_listener,lsnracmeprod
Step 2: Filter that list for strings containing acme_qa
1,Up,oracle_database,acme_qa
1,Up,oracle_listener,lsnracmeqa
Step 3: Just list the database
1,Up,oracle_database,acme_qa
Step 4: Return the fourth string after a comma delimiter
acme_qa
Be sure to call the function by name during script execution:
read INPUT_VAL?"Enter the database to be managed:"
GetTargetName
Managing Blackouts with EM CLI
The most common use of Enterprise Manager is to send notifications for target down events or metrics that fall
outside limits you've set. You control those alerts during planned outages by creating blackouts for individual targets
or groups of targets. There are a number of settings required to create a blackout, and the EM console provides a
handy, attractive means to do it.
EM CLI provides a means of creating, stopping, and deleting blackouts inside your shell scripts. All of the same
options found in the console are configurable through EM CLI, since it exercises the same Java code behind the scenes.
 
Search WWH ::




Custom Search