在Windows系统中Oracle会以系统服务的形式出现,通过系统服务来管理即可.
在Unix/Linux中,要调度启动Oracle就需要自己写shell脚本程序了,然后通过crontab来定时调度
①create table test(id int,starttime date,state int);
cursor cur is select * from test where state=0;
v_id int;
v_starttime date;
v_state int;
begin
open cur;
loop
fetch cur into v_id,v_starttime,v_state;
exit when cur%notfound;
update test set state=1 where starttime=sysdate;
commit;
end loop;
close cur;
end;
/
SQL variable job1 number;
SQL
SQL begin
PL/SQL 过程已成功完成.
运行JOB
oracle数据库如何启动时自动执行定时任务job
job定时任务需要依托存储过程.
①.、创建存储过程:create or replace procedure MYPROC as
insert into TEST values(sysdate);
variable job1 number;
以上就是土嘎嘎小编为大家整理的oracle怎么定时打开相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!