OracleScheduler & jobs
Application scheduler jobs and next run
Non-Oracle scheduler jobs with their state, last and next run, and failure count. Disabled or BROKEN jobs stand out at a glance.
Not yet verified. How scripts are tested
1CLEAR COLUMNS2SET LINESIZE 160 PAGESIZE 200 TRIMOUT ON TAB OFF3COLUMN owner FORMAT A154COLUMN job_name HEADING "JOB" FORMAT A355COLUMN enabled FORMAT A76COLUMN state FORMAT A107COLUMN last_run HEADING "LAST RUN" FORMAT A168COLUMN next_run HEADING "NEXT RUN" FORMAT A169COLUMN failure_count HEADING "FAILURES" FORMAT 99,99010 11SELECT owner, job_name, enabled, state,12 TO_CHAR(last_start_date, 'YYYY-MM-DD HH24:MI') AS last_run,13 TO_CHAR(next_run_date, 'YYYY-MM-DD HH24:MI') AS next_run,14 failure_count15FROM dba_scheduler_jobs16WHERE owner NOT IN (SELECT username FROM dba_users WHERE oracle_maintained = 'Y')17ORDER BY next_run_date NULLS LAST;Save it as ora-sched-jobs.sql and run it with SQL> @ora-sched-jobs.
Open in denrepoRelated tool: Scheduler job builder
More Oracle scripts: Scheduler & jobs
- Scheduler job failures in the last 24 hoursEvery job run that didn't succeed, with the error number and the start of the error text.
- Scheduler jobs running nowJobs currently executing, the session running each one and how long it has been going.
- Legacy DBMS_JOB jobsOld-style jobs, which still turn up in upgraded databases. From 19c they're implemented as scheduler jobs underneath, but DBA_JOBS still shows them…