如何診斷 job 執行失敗

來源:互聯網
上載者:User

如何診斷 job 執行失敗

1. 看job有沒有機會執行
  確保init.ora中job_queue_processes參數是否被設為>0的值.
  show parameter job_queue_processes

2. 看是否執行job出錯.
    查看alert.log擷取出錯資訊.

3. 看是否job所調用的procedure/package出錯.
   這個需要你自己在procedure/package中自己書寫記錄錯誤記錄檔的代碼.

4. 經常查看你的DBA_JOBS看看,相應的job是不是broken了,
BROKEN: Y: no attempt is made to run this job
                N: an attempt is made to run this job

A job can be broken in two ways:
Oracle has failed to successfully execute the job after sixteen attempts. The job has been explicitly marked as broken by using the procedure DBMS_ JOB.BROKEN.
在嘗試(預設)16次後還是不能成功執行,該job會被oracle自動標籤為broken=y

 或者你可以手動運行看看,有什麼錯誤提示。
EXECUTE DBMS_JOB.RUN(JOB_ID);

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.