
< ============================================================= >
job 8763最后一次成功执行在2014/12/24 17:26
JOB失败原因: ORA-01400: cannot insert NULL into ("SPAPP"."PROC_ALARM_LIST"."CONTENT")
If the job is submitted through DBMS_SCHEDULER, you could query DBA_SCHEDULER_JOB_RUN_DETAILS.
However, for jobs submitted through DBMS_JOB (visible in DBA_JOBS), there is no "history". The total runtime for a job (but not the number of runs) is the only indicator in DBA_JOBS.TOTAL_TIME.
So, you'd have to write your own procedures to gather information from the DBA_JOBS view, at least as frequently as your most frequent job.
The only to verify your job wasn't running is alert log:
由上可以确定异常为逻辑问题,开发部门同事于2014/12/24 17:25 做大量的逻辑变更操作,其中涉及到JOB 执行的SP
至此基本确定job执行失败的原因。但是何以导致JOB 状态为broken ?
根据Oracle文档介绍:
Job Execution Errors
When a job fails, information about the failure is recorded in a trace file and the alert log. Oracle writes message number ORA-12012 and includes the job number of the failed job.
The following can prevent the successful execution of queued jobs:
A network or instance failure
An exception when executing the job
If a job returns an error while Oracle is attempting to execute it, Oracle tries to execute it again. The first attempt is made after one minute, the second attempt after two minutes, the third after four minutes, and so on, with the interval doubling between each attempt. If the job fails 16 times, Oracle automatically marks the job as broken and no longer tries to execute it. However, between attempts, you have the opportunity to correct the problem that is preventing the job from running. This will not disturb the retry cycle, and Oracle will eventually attempt to run the job again .
请参考:
https://docs.oracle.com/cd/A97630_01/server.920/a96521/jobq.htm
Broken Jobs and the Job Queue ( Doc ID 103349.1 )