:

Enterprise Manager Library Job Removal

One of the main purposes of the Enterprise Manager (EM) software is to centralise the management of various components across your infrastructure. Using the EM software, you can schedule jobs to run against various targets. If, like me, you have lots of jobs running against the databases, you may want to delete them all at one point.

The reason I wanted to do this was because we were changing the agent and needed to remove all the jobs before moving to a new one. Something which I didn’t want to have to do manually…

I used this statement to generate commands to remove all jobs from OEM library:

SELECT 'EXEC Mgmt_Diag.DeleteJob(HEXTORAW('''||JOB_ID||'''));'
FROM MGMT_JOB
WHERE JOB_OWNER='SYSMAN'
AND IS_LIBRARY=1;

This produces a list of SQL statements which you can run against the DB as the SYSMAN user in your Enterprise Manager repository database.

Like it, share it...

Category: Enterprise Manager


Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *