ORA-12005: may not schedule automatic refresh for times in the past

來源:互聯網
上載者:User

ORA-12012: error on auto execute of job 125

ORA-12005: may not schedule automatic refresh for times in the past

 

ORA-12012: 自動執行作業 125 出錯

ORA-12005: 不能安排過去時間的自動重新整理


 dba_jobs包含以下幾個主要的欄位:

(a)LAST_DATE:Date on which this job last successfully executed--job執行成功的時間,即1.job執行成功;2.是job執行完畢的時間
(b)LAST_SEC:同LAST_DATE
(c)THIS_DATE:Date that this job started executing (usually null if not executing)--沒有job在執行的時候,該欄位為空白。若有job正在運行,這個時間是job的開始執行時間。
(d)THIS_SEC:同THIS_DATE
(e)NEXT_DATE:Date that this job will next be executed--job下次執行時間點。
(f)NEXT_SEC:同NEXT_DATE
(g)INTERVAL:A date function, evaluated at the start of execution, becomes next NEXT_DATE--重點的說明一下這個參數,這個參數涉及到next date的計算,next就是根據job的開始執行時間點,結合interval中的時間函數,算出來的。

比如,某個job開始執行時間8月1日23:55,那麼如果interval是trunc(sysdate)+1435/1440,因此,next date就是把job的開始時間23:55,代入到interval中的sysdate,得到的結果就仍然是8月1日的23:55。而next date的更新,是一次job完成時更新的,比如job在8月2日的0:15完成,於是在更新next date的時候,就發現next date的時間晚於當前的時間,於是就報錯may not schedule automatic refresh for times in the past。而事實上,job應該是成功執行了的。

為瞭解決這個報錯,interval改成trunc(sysdate+1)+1435/1440。

注意:

如果一個job執行failure後,oracle會嘗試重新執行,若16次嘗試後還是failure,則oracle會將這個job的broken設為true,即停掉這個job。
當job失敗後,系統會在1分鐘後重新運行這個JOB,如果還是失敗,就在和第1次失敗間隔2分鐘的時候繼續運行這個JOB,如果還是失敗,就在和 第2次失敗相隔4分鐘後運行這個JOB,直到 失敗間隔時間≥interval(JOB正常工作的時間設定參數)後,系統檢測的時間間隔就為interval.直到第16次失敗就會將這個job置為 broken。

--本篇文章轉自:http://blog.163.com/ansel_zlh/blog/static/103727172008825113225901/

http://gxg353.blog.sohu.com/236100357.html

http://blog.sina.com.cn/s/blog_60b1f55d01014mje.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.