Database Reference
In-Depth Information
Figure 11-11. An example of backup job information for both the active jobs (submitted) and the jobs retained in
the library
select mj.job_owner, mj.job_name,
decode(mj.is_library, 1, 'JOB_LIBRARY', 0, 'JOB_ACTIVITY')
from sysman.mgmt_job mj
order by mj.job_owner, mj_job_name;
The EMCLI can also be used to gather data regarding jobs in the environment. This utility has its own set of
verbs (commands) that are invoked to query, execute, configure, deploy, and manage the Enterprise Manager from a
command-line interface, often providing more-enhanced capabilities than the graphical interface of the EM console.
As an example of this feature, we can query job data from the EMCLI by executing the following:
emcli get_jobs
REFRESH_MV_ORCL.MV_DEVA_PART.1 SQLScript
416E2CE166724F53BCF3ECD798E1759B
B16A12D945A1466C871B99E1A5226309
2013-01-21 07:00:00 2013-01-21 07:02:22America/Chicago
Succeeded 5 SYSJOB oracle_database ORCL5
ORCL5_MFC_APP_REF.1 SQLScript
F39C0BE9B9F74F758FFDA95392778CDF
E088B023C23048E79768BC4FEC2888B3
2013-01-20 06:00:00 2013-01-20 06:00:23
America/Chicago
Succeeded 5 SYSJOB oracle_database ORCL5
The JOB_ID column is one of the most common columns to join on in this schema, as it identifies the job in
question. In the preceding results, you can see that two jobs were returned that included the job name, job type, job
ID, and target GUID, along with execution information, including times, time zone, and whether the job successful.
In the next example, MGMT_JOB_EXEC_SUMMARY is joined to the MGMT_JOB table to display the most recent history
and verify the job status.
select mj.job_name, mjes.start_time, mjes.end_time,
DECODE(mjes.status,
1, 'SCHEDULED', 2, 'RUNNING', 3, 'FAILED INIT',
4, 'FAILED', 5, 'SUCCEEDED', 6, 'SUSPENDED',
7, 'AGENT DOWN', 8, 'STOPPED', 9, 'SUSPENDED/LOCK',
10, 'SUSPENDED/EVENT', 11, 'SUSPENDED/BLACKOUT',
12, 'STOP PENDING', 13, 'SUSPEND PENDING', 14, 'INACTIVE',
15, 'QUEUED', 16, 'FAILED/RETRIED', 17, 'WAITING', 18, 'SKIPPED',status) "Execution STATUS"
from sysman.mgmt_job mj, sysman.mgmt_job_exec_summary mjes
 
Search WWH ::




Custom Search