Forgot your password?    
+ Reply to Thread
Results 1 to 1 of 1

Thread: Scripts to list Scheduled and Running Jobs from DBMS_JOB

  1. #1
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427

    Scripts to list Scheduled and Running Jobs from DBMS_JOB

    REM Lists all jobs that have been submitted to run in the local database job queue.

    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
    /


    REM Lists all jobs that are currently running in the local databbase.

    set pagesize 80
    title -
    center 'List Running Jobs' skip 2

    col sess format 99 heading 'Ses'
    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 'This|Run|Date'
    col nrt format a5 heading 'This|Run|Time'
    col fail format 99 heading 'Err'

    select
    djr.sid sess,
    djr.job jid,
    dj.log_user subu,
    dj.priv_user secd,
    dj.what proc,
    to_char(djr.last_date,'MM/DD') lsd,
    substr(djr.last_sec,1,5) lst,
    to_char(djr.this_date,'MM/DD') nrd,
    substr(djr.this_sec,1,5) nrt,
    djr.failures fail
    from
    sys.dba_jobs dj,
    sys.dba_jobs_running djr
    where
    djr.job = dj.job
    /

+ Reply to Thread

Similar Threads

  1. Scheduled Concurrent Program failing but Same program run successfull on manual run
    By himsinha in forum Concurrent Processing Server / Workflow
    Replies: 1
    Last Post: 11-29-2012, 06:25 PM
  2. OIM : List of Tables and Description
    By Hemant in forum Oracle Fusion Middleware 11G - OIM , OAM , ODS , Weblogic , Webgate ..
    Replies: 0
    Last Post: 05-08-2012, 01:23 PM
  3. Interested Transcation List(ITL).
    By ajaychandi in forum Core Database Administration and Monitoring
    Replies: 0
    Last Post: 01-09-2012, 02:43 PM
  4. pending jobs in queue that should be running
    By Hemant in forum SCRIPTS : Concurrent Requests & Concurrent Request Sessions
    Replies: 0
    Last Post: 10-31-2011, 08:17 PM
  5. List Scheduled Concurrent Requests
    By Hemant in forum SCRIPTS : Concurrent Requests & Concurrent Request Sessions
    Replies: 0
    Last Post: 10-31-2011, 08:12 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training


Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics