Cheeky Cockatoo

Life Advice and Stories, Travel, Oracle Tech, Good Food and More

jobs_running.sql

Download Script

set pages 1000
set arraysize 1

col job format 99999
col log_user format a10
col LAST_DATE format a22
col NEXT_DATE format a22
col TOTAL_TIME format 9999999 Heading "Total|Time"
col interval format a30
col failures format 9999 heading "Tries"

alter session set nls_date_format = 'DD-MON-YYYY HH24:MI';

select /*+ rule */
       dj.JOB,
       djr.sid,
       dj.LOG_USER, 
       dj.LAST_DATE, 
       NEXT_DATE, 
       TOTAL_TIME,
       BROKEN,
       dj.FAILURES,
       INTERVAL,
       WHAT
from dba_jobs dj, dba_jobs_running djr
where dj.job = djr.job
order by 2, 1;