标签:style blog class code c ext
create table job_exec_logs (id number ,current_date date , next_date date ,failures number ,broken varchar2( 2)) ; create sequence seq_job_exec_logs_id ;
create or replace procedure pro_my_test is begin insert into job_exec_logs select seq_job_exec_logs_id.nextval , sysdate , next_date , failures , broken from user_jobs ; commit ; execute immediate ‘select * from ddddsfs‘ ; end ;
var job number ; begin sys.dbms_job.submit(job => :job, what => ‘pro_my_test ;‘, next_date => sysdate, interval => ‘sysdate+5‘ ); commit; end; /
dexter@REPO>select trunc((next_date-lag(next_date,1) over (order by 4))*24*60) from ( 2 select * from job_exec_logs 3 union all 4 select 11111, sysdate , next_date ,failures , broken from user_jobs 5 order by 4 nulls first) ; TRUNC((NEXT_DATE-LAG(NEXT_DATE,1)OVER(ORDER BY 4))*24*60) ------------------------------------------------------- 2 4 8 15 32 64 128 256 512 1024 1440 1440 已选择13行。
Oracle 数据库 JOB 失败后的重试规律解密,布布扣,bubuko.com
标签:style blog class code c ext
原文地址:http://blog.csdn.net/renfengjun/article/details/25595923