UPDATING SCHEDULER WINDOWS:
FranklinFaces.com
FranklinFaces.com - Oracle & SQL Server Database Forums for all IT Professionals
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



UPDATING SCHEDULER WINDOWS: Expand / Collapse
Message
Posted 3/5/2009 10:52:50 AM Post #98
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
There are times when you will need to update your windows based on business requirements or simply because your process takes longer then the default weeknight and weekend scheduler window. Here are some guidelines to use for creating and updating scheduler activities.



To create a window, use the CREATE_WINDOW procedure. The following statement illustrates an example of creating a window:

BEGIN
DBMS_SCHEDULER.CREATE_WINDOW (
window_name => 'CUSTOM_WINDOW',
resource_plan => 'HI_RESOURCE1',
start_date => '15-JAN-09 01.00.00 AM',
repeat_interval => 'FREQ=DAILY',
end_date => '15-SEP-09 01.00.00 AM',
duration => interval '60' minute,
window_priority => 'HIGH',
comments => 'This is my custom window.');
END;
/



There are default windows already created in the system. If you would like to make changes to the attributes to the default windows, here are the steps:
Default window names are: WEEKNIGHT_WINDOW and WEEKEND_WINDOW:


This will change the WEEKNIGHT_WINDOW to run M-F starting at 5pm (17hours). It will also run for 600 Minutes or 10 hours.

EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE('WEEKNIGHT_WINDOW', 'repeat_interval', 'freq=daily;byday=MON, TUE, WED, THU, FRI;byhour=17;byminute=0;bysecond=0');
EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE('WEEKNIGHT_WINDOW', 'duration', interval '600' minute);


This will change the WEEKEND_WINDOW to run from Friday - Sunday (5pm to 3AM) (10 Hours)

EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE('WEEKEND_WINDOW', 'repeat_interval', 'freq=daily;byday=FRI, SAT, SUN;byhour=17;byminute=0;bysecond=0');
EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE('WEEKEND_WINDOW', 'duration', interval '600' minute);


You can see the updated schedule by querying this view:

select * from dba_scheduler_windows
where window_name in ('WEEKNIGHT_WINDOW','WEEKEND_WINDOW');







« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: silencer

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 7:28am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.066. 9 queries. Compression Disabled.