Oracle Scheduler 

DBMS_SCHEDULER

Check Job Status

Check Job History

Check Job Definition

You can use DBMS_METADATA to extract the job definition DDL...

SET LONG 100000

SELECT dbms_metadata.get_ddl('PROCOBJ','&MYJOBNAME','&MYSCHEMA') AS job_definition_ddl

  FROM dual;

&MYJOBNAME and &MYSCHEMA should match the output from the Job Status script above.

Enabling/Disabling Jobs

To prevent a job running (without removing it's definition) you should disable it. To reinstate the job schedule you should then enable it again.

Check Status

SELECT owner, job_name, enabled

  FROM dba_scheduler_jobs;

or

SELECT owner, job_name, enabled

  FROM DBA_SCHEDULER_JOBS 

 WHERE job_name = '&JOB_NAME';

Enable a job

EXEC dbms_scheduler.enable('&OWNER.JOB');

Stop a running job

EXEC dbms_scheduler.stop_job('"&OWNER"."&JOB"');

Disable a job

NOTE: Double Quotes are only really necessary where the name is in mixed case.

EXEC dbms_scheduler.disable('&OWNER."&JOB"');

Disable All Jobs

SET pagesize 0

SET trimspool on

SET echo off

SET feedback off

SPOOL disablealljobs.sql

SELECT 'EXEC dbms_scheduler.disable('''||owner||'."'||job_name||'"'');'

  FROM dba_scheduler_jobs

 WHERE owner NOT IN ('SYS','SYSTEM','otherOwnerToIgnore');

SPOOL off

SET echo on

SET feedback on

Edit disablealljobs.sql for your needs... e.g. Remove first 3 lines, Remove last line, add 'set feedback off' and 'set echo off'.

Then...

@disablealljobs.sql

Bibliography