OracleScheduler & jobs
Scheduler job failures in the last 24 hours
Every job run that didn't succeed, with the error number and the start of the error text.
Not yet verified. How scripts are tested
1CLEAR COLUMNS2SET LINESIZE 180 PAGESIZE 200 TRIMOUT ON TAB OFF3COLUMN at_time HEADING "TIME" FORMAT A164COLUMN owner FORMAT A155COLUMN job_name HEADING "JOB" FORMAT A306COLUMN status FORMAT A107COLUMN error# HEADING "ORA-" FORMAT 999998COLUMN info HEADING "DETAIL" FORMAT A70 WORD_WRAPPED9 10SELECT TO_CHAR(log_date, 'YYYY-MM-DD HH24:MI') AS at_time,11 owner, job_name, status, error#,12 DBMS_LOB.SUBSTR(additional_info, 200, 1) AS info13FROM dba_scheduler_job_run_details14WHERE status <> 'SUCCEEDED'15 AND log_date > SYSTIMESTAMP - INTERVAL '1' DAY16ORDER BY log_date DESC;Save it as ora-sched-failed.sql and run it with SQL> @ora-sched-failed.
Open in denrepoRelated tool: Scheduler job builder
Part of these runbooks
More Oracle scripts: Scheduler & jobs
- Scheduler jobs running nowJobs currently executing, the session running each one and how long it has been going.
- Application scheduler jobs and next runNon-Oracle scheduler jobs with their state, last and next run, and failure count. Disabled or BROKEN jobs stand out at a glance.
- 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…