ORA-12005: may not schedule automatic refresh for times in the past
来源:互联网 发布:java高级程序设计图片 编辑:程序博客网 时间:2024/05/29 16:04
有同事反映有一job執行時間不對,設定每月最後一天晚上9點,總跑到次月1號凌晨1點多執行。
檢查alterSID.log后發現如下錯誤:
ORA-12012: error on auto execute of job 661
ORA-12005: may not schedule automatic refresh for times in the past
檢查alterSID.log后發現如下錯誤:
ORA-12012: error on auto execute of job 661
ORA-12005: may not schedule automatic refresh for times in the past
下次開始時間,小于當前時間
再檢查job,interval
---------------------------------
begin
sys.dbms_job.submit(job => :job,
what => 'SP_EIS_YFZZ;',
next_date => to_date('30-09-2013 21:00:00', 'dd-mm-yyyy hh24:mi:ss'),
interval => '/*每月最後一天晚上9點*/TRUNC(LAST_DAY(SYSDATE))+21/24');
commit;
end;
/
sys.dbms_job.submit(job => :job,
what => 'SP_EIS_YFZZ;',
next_date => to_date('30-09-2013 21:00:00', 'dd-mm-yyyy hh24:mi:ss'),
interval => '/*每月最後一天晚上9點*/TRUNC(LAST_DAY(SYSDATE))+21/24');
commit;
end;
/
---------------------------------
發現問題了,改為如下
begin
sys.dbms_job.submit(job => :job,
what => 'SP_EIS_YFZZ;',
next_date => to_date('30-09-2013 21:00:00', 'dd-mm-yyyy hh24:mi:ss'),
interval => '/*每月最後一天晚上9點*/TRUNC(LAST_DAY(ADD_MONTHS(SYSDATE),1))+21/24');
commit;
end;
/
sys.dbms_job.submit(job => :job,
what => 'SP_EIS_YFZZ;',
next_date => to_date('30-09-2013 21:00:00', 'dd-mm-yyyy hh24:mi:ss'),
interval => '/*每月最後一天晚上9點*/TRUNC(LAST_DAY(ADD_MONTHS(SYSDATE),1))+21/24');
commit;
end;
/
---------------------------------
Oracle JOB 间隔时间详解
INTERVAL参数设置:
每天运行一次 'SYSDATE + 1'
每小时运行一次 'SYSDATE + 1/24'
每10分钟运行一次 'SYSDATE + 10/(60*24)'
每30秒运行一次 'SYSDATE + 30/(60*24*60)'
每隔一星期运行一次 'SYSDATE + 7'
每个月最后一天运行一次 'TRUNC(LAST_DAY(ADD_MONTHS(SYSDATE,1))) + 23/24'
每年1月1号零时 'TRUNC(LAST_DAY(TO_DATE(EXTRACT(YEAR from SYSDATE)||'12'||'01','YYYY-MM-DD'))+1)'
每天午夜12点 'TRUNC(SYSDATE + 1)'
每天早上8点30分 'TRUNC(SYSDATE + 1) + (8*60+30)/(24*60)'
每星期二中午12点 'NEXT_DAY(TRUNC(SYSDATE ), ''TUESDAY'' ) + 12/24'
每个月第一天的午夜12点 'TRUNC(LAST_DAY(SYSDATE ) + 1)'
每个月最后一天的23点 'TRUNC (LAST_DAY (SYSDATE)) + 23 / 24'
每个季度最后一天的晚上11点 'TRUNC(ADD_MONTHS(SYSDATE + 2/24, 3 ), 'Q' ) -1/24'
每星期六和日早上6点10分 'TRUNC(LEAST(NEXT_DAY(SYSDATE, ''S ......
INTERVAL参数设置:
每天运行一次 'SYSDATE + 1'
每小时运行一次 'SYSDATE + 1/24'
每10分钟运行一次 'SYSDATE + 10/(60*24)'
每30秒运行一次 'SYSDATE + 30/(60*24*60)'
每隔一星期运行一次 'SYSDATE + 7'
每个月最后一天运行一次 'TRUNC(LAST_DAY(ADD_MONTHS(SYSDATE,1))) + 23/24'
每年1月1号零时 'TRUNC(LAST_DAY(TO_DATE(EXTRACT(YEAR from SYSDATE)||'12'||'01','YYYY-MM-DD'))+1)'
每天午夜12点 'TRUNC(SYSDATE + 1)'
每天早上8点30分 'TRUNC(SYSDATE + 1) + (8*60+30)/(24*60)'
每星期二中午12点 'NEXT_DAY(TRUNC(SYSDATE ), ''TUESDAY'' ) + 12/24'
每个月第一天的午夜12点 'TRUNC(LAST_DAY(SYSDATE ) + 1)'
每个月最后一天的23点 'TRUNC (LAST_DAY (SYSDATE)) + 23 / 24'
每个季度最后一天的晚上11点 'TRUNC(ADD_MONTHS(SYSDATE + 2/24, 3 ), 'Q' ) -1/24'
每星期六和日早上6点10分 'TRUNC(LEAST(NEXT_DAY(SYSDATE, ''S ......
- ORA-12005: may not schedule automatic refresh for times in the past
- ORA-12005: may not schedule automatic refresh for times in the past
- 47.Your database instance is functional for the past one month. The Automatic Workload Repository (A
- in the past the cam
- Order Proposals in the Past
- The provider for invariant name 'System.Data.SqlClient' is specified multiple times in the applicati
- 'WHERE' is the same of 'on' in mysql(many times,but not always)
- christian louboutin replica In the past
- Gradle 'XNote' project refresh failed Error:Could not determine the class-path for interface com
- ERROR at line 1: ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
- ICE Manual(Documentation for Ice 3.5)---The Ice Run Time in Detail(Automatic Retries)
- The downside for developers of automatic app updating in iOS 7
- "The graphics preview in the layout editor may not be accurate: Path.isConvex is not supported. (Ig
- SQL Error:An aggregate may not appear in the set list of an UPDATE statement.
- Node 2478301 does not exist in the cache. It may have been deleted already.
- Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an
- 84.Which two files in the database can be configured for automatic backups by using the autobackup f
- THE PAST, PRESENT & FUTURE OF LOCAL STORAGE FOR WEB APPLICATIONS
- python pymssql freetds,用python访问sqlserver
- Jquery Uploadify多文件上传带进度条且传递自己的参数
- oracle 11g数据库”enq: TX - row lock contention“等待事件的处理
- 近几年的开发经验:数据库设计中三大范式应用场景解析
- php批量上传图片提示Warning: Invalid argument supplied for foreach()
- ORA-12005: may not schedule automatic refresh for times in the past
- POJ2485——Highways
- PLSQL 误删表恢复
- Android集成测试
- H264概念
- Unity3D ReadFile
- Android数独游戏03
- 使用JACOB进行Word编程示例
- Linux下编写C程序( GCC )(hello,world)