Friday, November 14, 2008

DBA_JOBS_RUNNING

DBA_JOBS_RUNNING lists all jobs that are currently running in the instance.

Column

Datatype

NULL

Description

SID

NUMBER

Identifier of process that is executing the job. See "V$LOCK".

JOB

NUMBER

Identifier of job. This job is currently executing.

FAILURES

NUMBER

Number of times this job started and failed since its last success.

LAST_DATE

DATE

Date that this job last successfully executed.

LAST_SEC

VARCHAR2(8)

Same as LAST_DATE. This is when the last successful execution started.

THIS_DATE

DATE

Date that this job started executing.

THIS_SEC

VARCHAR2(8)

Same as THIS_DATE. This is when the last successful execution started.

INSTANCE

NUMBER

Indicates which instance can execute or is executing the job; the default is 0.

Note:

1. Lists all jobs that are currently running in the local database.

select 
  djr.sid                        , 
  djr.job                        , 
  dj.log_user                    , 
  dj.priv_user                   , 
  dj.what                        , 
  to_char(djr.last_date,'MM/DD') , 
  substr(djr.last_sec,1,5)       , 
  to_char(djr.this_date,'MM/DD') , 
  substr(djr.this_sec,1,5)       , 
  djr.failures                    
from 
  dba_jobs dj, 
  dba_jobs_running djr 
where 
  djr.job = dj.job;

Oracle data dictionary views

Oracle dynamic performance views

No comments:

Post a Comment