JOB报错:ORA-23420: interval must evaluate to a time in the future

数据库版本Oracle 10gR2
1、更改spauto.sql为10分钟收集一次
begin
select instance_number into :instno from v$instance;
dbms_job.submit(:jobno, 'statspack.snap;', trunc(sysdate+1/144,'HH'), 'trunc(SYSDATE+1/144,''HH'')',
TRUE, :instno);
commit;
end;
/
2、执行@?/rdbms/admin/spauto.sql出现一下错误
ERROR at line 1:
ORA-23420: interval must evaluate to a time in the future
ORA-06512: at "SYS.DBMS_JOB", line 57
ORA-06512: at "SYS.DBMS_JOB", line 134
ORA-06512: at line 3

解决:
begin
select instance_number into :instno from v$instance;
dbms_job.submit(:jobno, 'statspack.snap;', trunc(sysdate+1/144,'MI'), 'trunc(SYSDATE+1/144,''MI'')',
TRUE, :instno);
commit;
end;
/

这样就OK了。

from:http://hi.baidu.com/javenzhen/blog/item/7a5e2cd23b0d5b063af3cfa9.html

你可能感兴趣的:(future)