list all queued jobs
SET ECHO off
REM NAME:Â Â TFSDBJBS.SQL
REM USAGE:”@path/tfsdbjbs”
REM ————————————————————————
REM REQUIREMENTS:
REMÂ Â Â SELECT on DBA_JOBS
REM ————————————————————————
REM PURPOSE:
REMÂ Â Â Lists all jobs that have been submitted to run in the
REMÂ Â Â local database job queue.
REM ————————————————————————
REM Main text of script follows:
Â
set pagesize 80
ttitle –
 center ‘List Submitted Jobs’ skip 2
Â
col jid format 999 heading ‘Id’
col subu format a10Â heading ‘Submitter’Â Â Â Â trunc
col secd format a10Â heading ‘Security’Â Â Â Â Â trunc
col proc format a20Â heading ‘Job’Â Â Â Â Â Â Â Â Â Â word_wrapped
col lsd format a5  heading ‘Last|Ok|Date’Â
col lst format a5  heading ‘Last|Ok|Time’
col nrd format a5  heading ‘Next|Run|Date’
col nrt format a5  heading ‘Next|Run|Time’
col fail format 999Â heading ‘Errs’
col ok  format a2  heading ‘Ok’
Â
select
 job                       jid,
 log_user                  subu,
 priv_user                 secd,
 what                      proc,
 to_char(last_date,’MM/DD’) lsd,
 substr(last_sec,1,5)      lst,
 to_char(next_date,’MM/DD’) nrd,
 substr(next_sec,1,5)      nrt,
 failures                  fail,
 decode(broken,’Y’,’N’,’Y’) ok
from
 sys.dba_jobs
/
Discussion ¬