📜  oracle 显示正在运行的作业 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:57.229000             🧑  作者: Mango

代码示例1
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;