TIP #6: Stop jobs in 10g

Before 10g, if you want to stop all jobs, you can simply set JOB_QUEUE_PROCESSES to zero.
In 10g, Oracle intrduced scheduler_job with many advanced features.
In this post I do not want to deal with different features of scheduler_jobs.
In 10g, it is possible to schedule job either in dba_jobs or dba_scheduler_jobs.
Setting JOB_QUEUE_PROCESSES to zero stops only jobs in dba_jobs which means that jobs in scheduler are still running .
In order to disable jobs in dba_scheduler_job, the following script should be run for each job in scheduler.


BEGIN
sys.dbms_scheduler.disable( '"schema?"."job name?"' );
END;



FYI : For finding all jobs using 10g scheduler, run select owner, job_name, state from dba_scheduler_jobs;

2 comments:

travelingpharaoh said...

thanks, you went right to the point where I needed.

shahid said...

thanks