Database Reference
In-Depth Information
where mj.job_id=mjes.job_id
and mj.job_name ='BACKUP_EM12REP_000044'
order by mjes.start_time desc;
The output from this query will result in backup job information on the database repository. Both the current
running job, along with the historical jobs information, can be seen in Figure 11-12 .
Figure 11-12. Querying job status information
We can then query the data from the last 24 hours that meets the following criteria: not requiring corrective
action— is_corrective_action = 0 , has a status of in standard job history— status IN (5,4,3,18,8) , and has
required— retried is not null .
SELECT mjes.job_id, mj.job_name, mjes.retried
FROM MGMT_JOB_EXEC_SUMMARY mjes, MGMT_JOB mj
WHERE mjes.job_id = mj.job_id AND mj.is_corrective_action = 0
AND mjes.status IN (5,4,3,18,8)
AND mjes.start_time > sysdate-1
and mjes.retried is not null;
Figure 11-13. The results for jobs that have experienced at least one retry
These basic queries offer examples of how to join the tables and how to report on the EM Job System from
SQL*Plus. This data can then help you troubleshoot, or you can use this information at the EMCLI to address an issue
or perform a task outside the EM console.
Knowing who has the right to create and manage jobs is essential. Jobs should be owned by individual users, with
preferred credentials set to this level to ensure accountability for the use of those credentials.
By creating the EM12c administrator logins and setting them up securely, you can see who ran a job and who
edited a job, ensuring that those creating, executing, and even deleting jobs are tracked effectively in the Enterprise
Manager access log. As the user is not the repository owner ( SYSMAN ), this eliminates security issues that could arise by
the extensive roles and grants given to this user by default in the EM12c environment.
To see who has credentials to run and manage jobs, you can run a simple query to show who has what privileges
(see Figure 11-14 ), along with how those credentials compare to those owned by the SYSMAN schema (see Figure 11-15 ).
Figure 11-16 provides a diagram for reference.
 
Search WWH ::




Custom Search