Monday, 14 February 2011

Finding and Removing Oracle Jobs...

Find Oracle Jobs:

1. Find running jobs:

SELECT r.sid, r.job, r.this_date, r.this_sec, SUBSTR(what,1,40) what FROM dba_jobs_running r,dba_jobs j WHERE r.job = j.job;

2. Find jobs:
col job format 99999;
SELECT job, next_date, next_sec, failures, broken, SUBSTR(what,1,40) DESCRIPTION FROM all_jobs;

you can use user_jobs, dba_jobs, all_jobs as table option in 2, as required.

Removing a job:

exec sys.dbms_ijob.remove(_job_id_);

No comments:

Post a Comment