Oracle scheduled task execution error information can be viewed in the following locations: job log (job_log) job scheduler log (scheduler_job_log) database alert log (alert_log.log) job queue job (job_queue_jobs) DBMS_SCHEDULER.GET_JOB_LOG package
Oracle scheduled task execution error information location
Oracle The error information generated during the execution of scheduled tasks can be viewed at the following location :
1. View the job log (job_log)
<code class="sql">SELECT JOB_NAME, LOG_DATE, STATUS, LOG_DETAILS FROM DBA_JOBS_LOG WHERE JOB_NAME = '<作业名称>';</code>
2. View the job scheduler log (scheduler_job_log)
<code class="sql">SELECT SCHEDULER_JOB_NAME, RUN_DATE, STATUS, LOG_DETAILS FROM DBA_SCHEDULER_JOB_LOG WHERE SCHEDULER_JOB_NAME = '<作业名称>';</code>
3. Check the database alarm log (alert_log.log)
If the error message is serious, it may be recorded in the database alarm log. By default, the alarm log is located in the following path:
<code class="sql">SELECT
JOB_NAME,
QUEUE_NAME,
STATUS,
MESSAGE
FROM
DBA_JOB_QUEUE_JOBS
WHERE
JOB_NAME = '<作业名称>';</code>
<code>DECLARE
jlob DBMS_LOB.CLOB;
BEGIN
DBMS_SCHEDULER.GET_JOB_LOG(
'作业名称',
jlob
);
-- 将 CLOB 中的数据导出为字符串
DBMS_OUTPUT.PUT_LINE(DBMS_LOB.SUBSTR(
jlob,
1,
DBMS_LOB.GETLENGTH(jlob)
));
END;
/</code>
The above is the detailed content of Where can I see the error message of Oracle scheduled task execution?. For more information, please follow other related articles on the PHP Chinese website!