Create Window
BEGIN
DBMS_SCHEDULER.CREATE_WINDOW(
window_name=>'"PERF_WEEKDAY_WINDOW"',
resource_plan=>'PERF_PLAN',
start_date=>systimestamp at time zone '+9:00',
duration=>numtodsinterval(720, 'minute'),
repeat_interval=>'FREQ=WEEKLY;BYDAY=MON,TUE,WED,THU,FRI;BYHOUR=9;BYMINUTE=0;BYSECOND=0',
end_date=>null,
window_priority=>'LOW',
comments=>'perf_weekday_window');
END;

BEGIN
DBMS_SCHEDULER.CREATE_WINDOW(
window_name=>'"PERF_WEEKNIGHT_WINDOW"',
resource_plan=>'PERF_PLAN',
start_date=>to_timestamp_tz('2009-05-08 +9:00', 'YYYY-MM-DD TZH:TZM'),
duration=>numtodsinterval(720, 'minute'),
repeat_interval=>'FREQ=WEEKLY;BYDAY=MON,TUE,WED,THU,FRI;BYHOUR=21;BYMINUTE=0;BYSECOND=0',
end_date=>null,
window_priority=>'LOW',
comments=>'perf_weeknight_window');
END;

BEGIN
DBMS_SCHEDULER.CREATE_WINDOW(
window_name=>'"PERF_WEEKEND_WINDOW"',
resource_plan=>'PERF_PLAN',
start_date=>to_timestamp_tz('2009-05-08 +9:00', 'YYYY-MM-DD TZH:TZM'),
duration=>numtodsinterval(1440, 'minute'),
repeat_interval=>'FREQ=WEEKLY;BYDAY=SAT,SUN;BYHOUR=1;BYMINUTE=0;BYSECOND=0',
end_date=>null,
window_priority=>'LOW',
comments=>'perf_weekend_window');
END;

BEGIN
DBMS_SCHEDULER.CREATE_WINDOW_GROUP(
group_name=>'"PERF_WINDOW_GROUP"',
window_list=>'"PERF_WEEKDAY_WINDOW","PERF_WEEKEND_WINDOW","PERF_WEEKNIGHT_WINDOW"');
END;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License