oracle定时任务

 declare
   jobId number;
 begin
   dbms_job.submit(job  => jobId,
                   what      => 'TEST();',
                   next_date => sysdate,
                   interval  => 'trunc(SYSDATE+1)+3/24'
                   );
   commit;
 end;

查看运行情况
select * from user_jobs;
select * from dba_jobs;
select * from dba_jobs_running;

 

dbms_job.submit();  添加新的job

dbms_job.run();运行某个已经存在的job

posted on 2014-12-08 09:57  LoveEyes  阅读(325)  评论(0编辑  收藏  举报

导航