oracle调度中使用schedule管理调度
时间:2021-07-01 10:21:17
帮助过:5人阅读
DBMS_SCHEDULER.create_schedule(schedule_name => ‘SCH_DAY_10_30‘,
start_date => systimestamp,
repeat_interval => ‘FREQ=DAILY; byhour=10;byminute=30‘);
DBMS_SCHEDULER.create_schedule(schedule_name => ‘SCH_DAY_20_10‘,
start_date => systimestamp,
repeat_interval => ‘FREQ=DAILY; byhour=20;byminute=10‘);
dbms_scheduler.create_job(job_name => ‘我的SCH测试‘,
repeat_interval => ‘SCH_DAY_10_30,SCH_DAY_20_10‘,
job_type => ‘PLSQL_BLOCK‘,
job_action => ‘BEGIN NULL;END;‘,
enabled => TRUE,
auto_drop => FALSE,
comments => null);
end;
通过使用调度,有几个好处:
- 只需要修改调度,不需要修改作业
- 简单易懂
oracle调度中使用schedule管理调度
标签:dmi 阅读 sql package ble ini begin repeat 资源