I have a scheduled a job in DBMS jobs (not DBMS scheduler). I can see the job has failed in weekends. I want to see the log file with failure reason. Where i can i find this?
Any suggestions please?
Thanks in advance.
I have a scheduled a job in DBMS jobs (not DBMS scheduler). I can see the job has failed in weekends. I want to see the log file with failure reason. Where i can i find this?
Any suggestions please?
Thanks in advance.
For DBMS_SCHEDULER (as noted by Frank Schmitt) try this:
SELECT *
FROM DBA_SCHEDULER_JOB_RUN_DETAILS
ORDER BY LOG_DATE DESC;
and then look in your bdump folder, for the trace files.
For DBMS_JOB you can view your alert log file:
SELECT VALUE
FROM V$PARAMETER
WHERE NAME = 'background_dump_dest';
or
SELECT VALUE
FROM V$SPPARAMETER
WHERE NAME = 'background_dump_dest';
The alert log file has a name like "alert_orcl.log", if your database name is the default "orcl".
For DBMS_JOB you'd see the information about failed job in the database alert log. There you'd also see a name of the tracefile with more information about the failure.
Late answer, but I think it will help people coming on this page for solution. Before getting into log details to debug, you will need to enable logging. By default, logging is disabled.
Below are options to enable logging :
Logging Level DBMS_SCHEDULER.LOGGING_OFF
DBMS_SCHEDULER.LOGGING_FAILED_RUNS DBMS_SCHEDULER.LOGGING_RUNS
DBMS_SCHEDULER.LOGGING_FULL
Now, you can set attribute to update logging level :
begin
DBMS_SCHEDULER.SET_ATTRIBUTE('job_name','logging_level',DBMS_SCHEDULER.LOGGING_FULL);
end;
© 2022 - 2024 — McMap. All rights reserved.