Vinod Chelladurai
Vinod Chelladurai

Reputation: 539

View the DBMS jobs log oracle

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.

Upvotes: 9

Views: 61613

Answers (3)

Shashi
Shashi

Reputation: 100

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;

Upvotes: -1

Lksh
Lksh

Reputation: 91

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.

Upvotes: 3

Corrado Piola
Corrado Piola

Reputation: 869

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".

Upvotes: 12

Related Questions