Database Reference
In-Depth Information
The add_target verb accepts over a dozen parameters; use the help functionality of EM CLI for a quick reference.
The online documentation provides a much more detailed description. Use the following reference if the command
help isn't enough:
http://docs.oracle.com/cd/E24628_01/em.121/e17786/cli_verb_ref.htm#CACHFHCA .
My Oracle Support (MOS) also has dozens of articles on specific use cases and examples for EM CLI. MOS
notes 1448276.1 and1543773.1 offer specific information on using EM CLI to add targets.
Task: Manipulating Jobs
Jobs are very important in EM. There are a number of jobs that are already created and running in a default
installation. Many administrators use EM's robust job scheduling and execution capabilities for their critical
enterprise tasks.
These capabilities can be fully exploited in both the GUI and EM CLI. For example, the GUI has a button called
“Create Like” in the jobs library that allows one to replicate the settings from one job to another in order to reduce
the amount of input necessary for two similar jobs. This functionality works great for a few jobs that look exactly alike
except for one or two changes.
But what if you need to create dozens or hundreds of jobs that are similar? Or you need to replicate a number
of jobs from one EM installation to another? EM CLI's functionality of exporting jobs to a text file and then importing
jobs from the same file or a modified version of that file makes job manipulation at any scale possible.
For example, a simple job that executes the uname -a OS command can be exported to a file. The command and
job name can be changed to uname with a different flag. Then, the modified text file with the new variables can be used
to create a new job, as shown in Listing 3-26.
Listing 3-26. Describe the UNAME_A_OMS job
[oracle ~]$ emcli describe_job -name='UNAME_A_OMS'
# Current status of the job is EXPIRED.
name=UNAME_A_OMS
type=OSCommand
owner=SYSMAN
target_list=oraoem1.example.com:host
# Credential Usage: defaultHostCred
# Description:
cred.defaultHostCred.<all_targets>:host=SET:HostCredsNormal
# Description: (Optional) Comma separated list of parameters to the command.
variable.args=/bin/uname -a
# Description: (Optional) Command to run on the target.
variable.command=%job_default_shell%
schedule.frequency=IMMEDIATE
 
Search WWH ::




Custom Search