job_show.sql

SET pagesize 50000
SET linesize 240
SET echo off
 
column job          format 9999  heading 'Job'          justify right
column schema_user  format a20   heading 'Oracle User'  justify left
column broken       format a6    heading 'Broken'       justify left
column last_date    format a20   heading 'Last Date'    justify left
 
column this_date    format a20   heading 'This Date'    justify left
column next_date    format a20   heading 'Next Date'    justify left
column INTERVAL     format a60   heading 'Interval'     justify left
column what         format a80   heading 'What'         justify left
column failures     format 9999  heading 'Failures'     justify right
 
spool job_show.LOG;
 
SELECT JOB, SCHEMA_USER, BROKEN,
       TO_CHAR(LAST_DATE, 'DD-MON-YYYY, HH24:MI') LAST_DATE,
       TO_CHAR(THIS_DATE, 'DD-MON-YYYY, HH24:MI') THIS_DATE,
       TO_CHAR(NEXT_DATE, 'DD-MON-YYYY, HH24:MI') NEXT_DATE,
       INTERVAL, WHAT
FROM dba_jobs;
 
SELECT JOB, FAILURES,
       TO_CHAR(LAST_DATE, 'DD-MON-YYYY, HH24:MI') LAST_DATE,
       TO_CHAR(THIS_DATE, 'DD-MON-YYYY, HH24:MI') THIS_DATE
FROM dba_jobs_running;
 
spool off;
 
-------------------------------------------------------------------------------
-- remove job
BEGIN
SYS.DBMS_IJOB.REMOVE(7);
END