创建job(sysdate+1/24/60 每分钟执行一次 TRUNC(SYSDATE+1) 每天0:00)
variable job2016 number;
begin dbms_job.submit(:job2016,'insert into a values(sysdate);',sysdate,'TRUNC(SYSDATE+1)');
end;
/
查询job
select job, what from dba_jobs;
执行job(144是查询出来的)
begin
dbms_job.run(144);
end;
/
停止job
begin
dbms_job.broken(144, true, sysdate);
commit;
end;
/
variable job2016 number;
begin dbms_job.submit(:job2016,'insert into a values(sysdate);',sysdate,'TRUNC(SYSDATE+1)');
end;
/
查询job
select job, what from dba_jobs;
执行job(144是查询出来的)
begin
dbms_job.run(144);
end;
/
停止job
begin
dbms_job.broken(144, true, sysdate);
commit;
end;
/