查看相关Oracle job信息
1、相关视图
dba_jobs
all_jobs
user_jobs
dba_jobs_running
包含正在运行Oracle job相关信息
2、查看相关信息
SQL>SELECT JOB, NEXT_DATE, NEXT_SEC, FAILURES, BROKEN
SQL>FROM DBA_JOBS;
JOB NEXT_DATE NEXT_SEC FAILURES B
9125 01-JUN-01 00:00:00 4 N
14144 24-OCT-01 16:35:35 0 N
9127 01-JUN-01 00:00:00 16 Y
3 rows selected.
正在运行的JOB相关信息
SELECT SID, r.JOB, LOG_USER, r.THIS_DATE, r.THIS_SEC
FROM DBA_JOBS_RUNNING r, DBA_JOBS j
WHERE r.JOB = j.JOB;
SID JOB LOG_USER THIS_DATE THIS_SEC
12 14144 HR 24-OCT-94 17:21:24
25 8536 QS 24-OCT-94 16:45:12
2 rows selected.
JOB QUEUE LOCK相关信息
SELECT SID, TYPE, ID1, ID2
FROM V$LOCK
WHERE TYPE = ’JQ’;
SID TY ID1 ID2
12 JQ 0 14144
1 row selected.