@@header

/*
*
*  Author        : Vishal Gupta
*  Purpose       : Display DBMS Jobs
*  Compatibility : 
*  Parameters    : NONE
*
*  Revision History:
*  ===================
*  Date       Author        Description
*  ---------  ------------  -----------------------------------------
*  03-Sep-12  Vishal Gupta  Created
*
*/


PROMPT **************************************************
PROMPT * DBMS Jobs
PROMPT **************************************************

COLUMN job          HEADING  "Job"                FORMAT 9999
COLUMN broken       HEADING  "Broken"             FORMAT a1
COLUMN instance     HEADING  "I#"                 FORMAT 999
COLUMN priv_user    HEADING  "PrivUser"           FORMAT a18
COLUMN last_date    HEADING  "LastRunTime"        FORMAT a18
COLUMN this_date    HEADING  "CurrentRunTime"     FORMAT a18
COLUMN next_date    HEADING  "NextRunTime"        FORMAT a18
COLUMN interval     HEADING  "Interval"           FORMAT a40
COLUMN failures     HEADING  "Failures"           FORMAT 99999
COLUMN what         HEADING  "What"               FORMAT a80

SELECT j.job
     , j.broken
     , j.instance
     , j.priv_user
     , TO_CHAR(j.last_date,'DD-MON-YY HH24:MI:SS') last_date
     , TO_CHAR(j.this_date,'DD-MON-YY HH24:MI:SS') this_date
     , TO_CHAR(j.next_date ,'DD-MON-YY HH24:MI:SS') next_date
     , j.interval
     , j.failures
     , j.what
  FROM dba_jobs j
;  

@@footer
