码迷,mamicode.com
首页 > 数据库 > 详细

oracle定时调用存储过程

时间:2015-12-04 13:01:24      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:

http://zhidao.baidu.com/link?url=wY9qYTQHX7YksWmE9LtF4UIOkJgCDi8mXS7XkWi9u0GcD9dh0Evr7OHVzSsPDZAH6F258S4b3KAdkKvKLoPVOq

 

http://blog.csdn.net/thinkscape/article/details/7411012

 

 

:+++++++++++++++++++++++++++++

步骤:

-- Create table
create table JOB_TABLE
(
run_time DATE
)
tablespace DEMO
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);

 

 

++++++++++++++++++++++++++

create or replace procedure job_proc is
begin
insert into job_table (run_time) values (sysdate);
end;

 

+++++++++++++++++++++++++

declare 
job number; --‘TRUNC(SYSDATE+1)+(11*60+47)/(24*60)‘
begin 
--dbms_job.submit(job, ‘job_proc;‘, sysdate, ‘TRUNC(SYSDATE+1)+(11*60+51)/(24*60)‘);
dbms_job.submit(job, ‘job_proc;‘, sysdate, ‘TRUNC(sysdate,‘‘mi‘‘) + 1 / (24*60)‘); 
end;
/
commit

select job,broken,what,interval,t.* from user_jobs t;

 

+++++++++++++++++++++++++++

 

oracle定时调用存储过程

标签:

原文地址:http://www.cnblogs.com/zshboke-2015/p/5018916.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!