Home  >  Article  >  Database  >  ORA-12005不能安排过去时间的自动刷新--问题处理

ORA-12005不能安排过去时间的自动刷新--问题处理

WBOY
WBOYOriginal
2016-06-07 16:00:262452browse

这两天一个库总报ORA-12005的错误查看alert日志信息:Thu Apr 09 22:30:03 2015Errors in file /oracle/app/oracle/diag/rdbms/p

这两天一个库总报ORA-12005的错误
查看alert日志信息:
Thu Apr 09 22:30:03 2015
Errors in file /Oracle/app/oracle/diag/rdbms/prps/PRPS1/trace/PRPS1_j000_16601.trc:
ORA-12012: 自动执行作业 304 出错
ORA-12005: 不能安排过去时间的自动刷新

查看job信息
select job,log_user,schema_user,what,LAST_DATE,LAST_SEC,THIS_DATE,THIS_SEC,NEXT_DATE,NEXT_SEC,INTERVAL
from dba_jobs where job=304;

304  TSSNEWDATA  TSSNEWDATA  p_buproposalStatistics;00:06:072015/4/13 22:00:0022:00:00trunc(sysdate)+132/144

job执行的时间是22:30:03,根据INTERVAL的值trunc(sysdate)+132/144算出下次执行时间是Apr 09 22:00
这个时间在当前时间之前,所以报错ORA-12005: 不能安排过去时间的自动刷新

跟开发人员沟通之后修改INTERVAL的值为trunc(sysdate+1)+132/144

[oracle@zbdb1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Apr 13 10:05:57 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> exec dbms_ijob.interval(304,'trunc(sysdate+1)+132/144');  --这里要使用 dbms_ijob.interval这个包,dbms_job只能修改本用户下的job,,而dbms_ijob可以修改其他用户的,但是必须sys用户执行

PL/SQL procedure successfully completed.

SQL> commit;

Commit complete.

本文永久更新链接地址

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn