denrepo

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

ora-sched-failed.sql
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