如何查看用户的 oracle job的运行日志?

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:38

如何查看用户的 oracle job的运行日志,使用以下方法可以查看:

select * from user_scheduler_job_log where job_name = '71122' order by log_id desc;
select * from user_scheduler_job_run_details where log_id = 764;

[color=darkred]USER_SCHEDULER_JOB_LOG displays log information for the Scheduler jobs owned
by the current user. Its columns are the same as those in ALL_SCHEDULER_JOB_LOG.

SQL> desc user_scheduler_job_log;
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
LOG_ID NOT NULL NUMBER
LOG_DATE TIMESTAMP(6) WITH TIME ZONE
OWNER VARCHAR2(30)
JOB_NAME VARCHAR2(65)
JOB_SUBNAME VARCHAR2(65)
JOB_CLASS VARCHAR2(30)
OPERATION VARCHAR2(30)
STATUS VARCHAR2(30)
USER_NAME VARCHAR2(30)
CLIENT_ID VARCHAR2(64)
GLOBAL_UID VARCHAR2(32)
CREDENTIAL_OWNER VARCHAR2(65)
CREDENTIAL_NAME VARCHAR2(65)
DESTINATION_OWNER VARCHAR2(128)
DESTINATION VARCHAR2(128)
ADDITIONAL_INFO CLOB

USER_SCHEDULER_JOB_RUN_DETAILS displays log run details for the Scheduler
jobs owned by the current user. Its columns are the same as those in ALL_
SCHEDULER_JOB_RUN_DETAILS.

SQL> desc user_scheduler_job_run_details;
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
LOG_ID NUMBER
LOG_DATE TIMESTAMP(6) WITH TIME ZONE
OWNER VARCHAR2(30)
JOB_NAME VARCHAR2(65)
JOB_SUBNAME VARCHAR2(65)
STATUS VARCHAR2(30)
ERROR# NUMBER
REQ_START_DATE TIMESTAMP(6) WITH TIME ZONE
ACTUAL_START_DATE TIMESTAMP(6) WITH TIME ZONE
RUN_DURATION INTERVAL DAY(3) TO SECOND(0)
INSTANCE_ID NUMBER
SESSION_ID VARCHAR2(30)
SLAVE_PID VARCHAR2(30)
CPU_USED INTERVAL DAY(3) TO SECOND(2)
CREDENTIAL_OWNER VARCHAR2(65)
CREDENTIAL_NAME VARCHAR2(65)
DESTINATION_OWNER VARCHAR2(128)
DESTINATION VARCHAR2(128)
ADDITIONAL_INFO VARCHAR2(4000)

SQL> desc dba_scheduler_job_log;
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
LOG_ID NOT NULL NUMBER
LOG_DATE TIMESTAMP(6) WITH TIME ZONE
OWNER VARCHAR2(30)
JOB_NAME VARCHAR2(65)
JOB_SUBNAME VARCHAR2(65)
JOB_CLASS VARCHAR2(30)
OPERATION VARCHAR2(30)
STATUS VARCHAR2(30)
USER_NAME VARCHAR2(30)
CLIENT_ID VARCHAR2(64)
GLOBAL_UID VARCHAR2(32)
CREDENTIAL_OWNER VARCHAR2(65)
CREDENTIAL_NAME VARCHAR2(65)
DESTINATION_OWNER VARCHAR2(128)
DESTINATION VARCHAR2(128)
ADDITIONAL_INFO CLOB

SQL> desc dba_scheduler_job_run_details;
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
LOG_ID NUMBER
LOG_DATE TIMESTAMP(6) WITH TIME ZONE
OWNER VARCHAR2(30)
JOB_NAME VARCHAR2(65)
JOB_SUBNAME VARCHAR2(65)
STATUS VARCHAR2(30)
ERROR# NUMBER
REQ_START_DATE TIMESTAMP(6) WITH TIME ZONE
ACTUAL_START_DATE TIMESTAMP(6) WITH TIME ZONE
RUN_DURATION INTERVAL DAY(3) TO SECOND(0)
INSTANCE_ID NUMBER
SESSION_ID VARCHAR2(30)
SLAVE_PID VARCHAR2(30)
CPU_USED INTERVAL DAY(3) TO SECOND(2)
CREDENTIAL_OWNER VARCHAR2(65)
CREDENTIAL_NAME VARCHAR2(65)
DESTINATION_OWNER VARCHAR2(128)
DESTINATION VARCHAR2(128)
ADDITIONAL_INFO VARCHAR2(4000)

SQL> desc all_scheduler_job_run_details;
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
LOG_ID NUMBER
LOG_DATE TIMESTAMP(6) WITH TIME ZONE
OWNER VARCHAR2(30)
JOB_NAME VARCHAR2(65)
JOB_SUBNAME VARCHAR2(65)
STATUS VARCHAR2(30)
ERROR# NUMBER
REQ_START_DATE TIMESTAMP(6) WITH TIME ZONE
ACTUAL_START_DATE TIMESTAMP(6) WITH TIME ZONE
RUN_DURATION INTERVAL DAY(3) TO SECOND(0)
INSTANCE_ID NUMBER
SESSION_ID VARCHAR2(30)
SLAVE_PID VARCHAR2(30)
CPU_USED INTERVAL DAY(3) TO SECOND(2)
CREDENTIAL_OWNER VARCHAR2(65)
CREDENTIAL_NAME VARCHAR2(65)
DESTINATION_OWNER VARCHAR2(128)
DESTINATION VARCHAR2(128)
ADDITIONAL_INFO VARCHAR2(4000)

SQL> desc all_scheduler_job_log;
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
LOG_ID NOT NULL NUMBER
LOG_DATE TIMESTAMP(6) WITH TIME ZONE
OWNER VARCHAR2(30)
JOB_NAME VARCHAR2(65)
JOB_SUBNAME VARCHAR2(65)
JOB_CLASS VARCHAR2(30)
OPERATION VARCHAR2(30)
STATUS VARCHAR2(30)
USER_NAME VARCHAR2(30)
CLIENT_ID VARCHAR2(64)
GLOBAL_UID VARCHAR2(32)
CREDENTIAL_OWNER VARCHAR2(65)
CREDENTIAL_NAME VARCHAR2(65)
DESTINATION_OWNER VARCHAR2(128)
DESTINATION VARCHAR2(128)
ADDITIONAL_INFO CLOB

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】