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