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.
All Scheduler Job Run Detailsselect * from ALL_SCHEDULER_JOB_RUN_DETAILS; You can monitor dba scheduler running jobs as follows. select * from dba_scheduler_running_jobs; You can monitor dba scheduler running jobs details as follows.
To view job history: From the Home page, select Audit. From Audit Type, select Jobs.
ALL_SCHEDULER_JOBS displays information about the Scheduler jobs accessible to the current user. DBA_SCHEDULER_JOBS displays information about all Scheduler jobs in the database. USER_SCHEDULER_JOBS displays information about the Scheduler jobs owned by the current user.
select log_id, log_date, owner, job_name from ALL_SCHEDULER_JOB_LOG where job_name like 'RMAN_B%' and log_date > sysdate-2; select log_id,log_date, owner, job_name, status, ADDITIONAL_INFO from ALL_SCHEDULER_JOB_LOG where log_id=113708; DBA Scripts.
A log entry is made each time the job is run. DBMS_SCHEDULER.LOGGING_FULL. A log entry is made every time the job runs and for every operation performed on a job, including create, enable/disable, update (with SET_ATTRIBUTE), stop, and drop.
There are two packages related with Oracle database jobs which are called dbms_job,dbms_scheduler. DBMS_SCHEDULER offers new features by adding the ability to jobs with specific privileges and roles according to DBMS_JOB.
The alert log file has a name like "alert_orcl.log", if your database name is the default "orcl". Show activity on this post. 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.
It quickly becomes apparent why the dbms_scheduler package is the recommended way to schedule jobs in Oracle10g. The dbms_job package is still present in 10g, but only for backward compatibility. The jobs created using the dbms_job package were very much stand-alone in nature in that they were defined with their own schedules and actions.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With