oracle currently running jobs code example

Example: oracle show running job

SELECT * FROM USER_SCHEDULER_RUNNING_JOBS;		-- connected scheme
SELECT * FROM ALL_SCHEDULER_RUNNING_JOBS;		-- granted to connected scheme
SELECT * FROM DBA_SCHEDULER_RUNNING_JOBS;		-- all jobs (DBA)

-- More details (DBA)
SELECT DISTINCT r.OWNER, r.JOB_NAME, r.JOB_SUBNAME, r.ELAPSED_TIME, r.CPU_USED,
                d.ACTUAL_START_DATE
FROM DBA_SCHEDULER_RUNNING_JOBS r
         LEFT JOIN DBA_SCHEDULER_JOB_RUN_DETAILS d
                   ON d.SLAVE_PID = r.SLAVE_PROCESS_ID
ORDER BY r.OWNER, r.JOB_NAME, r.JOB_SUBNAME;

Tags:

Sql Example