Enable / Disable all dbms scheduled jobs in Oracle

Enable / Disable the dbms scheduled jobs

Check the status of DBMS Scheduled Jobs

SELECT JOB_NAME, OWNER, ENABLED FROM DBA_SCHEDULER_JOBS;

Enable the DBMS Scheduler jobs

exec dbms_scheduler.enable('JOB_NAME');

Disable the DBMS Scheduler Jobs

execute dbms_scheduler.disable('job_name');

Enable all the DBMS Scheduler jobs

begin
-- Use cursor to get list of scheduler jobs 
for r in ( select job_name from dba_scheduler_jobs)
loop
dbms_scheduler.enable(name => r.job_name, force => true);
end loop;
end;
/

Disable all the DBMS Scheduler jobs

begin
-- Use cursor to get list of scheduler jobs 
for r in ( select job_name from dba_scheduler_jobs)
loop
dbms_scheduler.disable(name=> r.job_name, force => true);
end loop;
end;
/

If you want to check currently running jobs

select job_name from dba_scheduler_jobs
 where state = 'RUNNING';

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.