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
https://oracle-base.com/articles/10g/scheduler-10ghttps://oracle-base.com/articles/11g/scheduler-enhancements-11gr2
1422706.1 How to change DBMS_SCHEDULER credentials
23https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/ALL_SCHEDULER_JOB_RUN_DETAILS.html
12.2https://docs.oracle.com/en/database/oracle/oracle-database/12.2/refrn/ALL_SCHEDULER_JOB_RUN_DETAILS.html
11.2https://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_sched.htm (Database PL/SQL Packages and Types Reference)
12cR1https://oracle-base.com/articles/12c/dbms_credential-12cr1
10.2https://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_2048.htm (ALL_SCHEDULER_JOB_RUN_DETAILS)