Window Groups
Let’s suppose that I have defined three different windows:
- MORNING
1:00 A.M. through 9:00 A.M. Most of the management jobs, such as statistics collection, etc., run during this window.
- WORKDAY
9:00 A.M. through 5:00 P.M. The entire regular database OLTP processing occurs during this window. No management or batch jobs are allowed to run.
- EVENING
5:00 P.M. through 1:00 A.M. Most of the batch jobs and ETL processing occur during this window.
However, some jobs have to run at all times, regardless of whatever window is active at that time—for example, jobs that monitor performance. I can’t define another window because at any point in time, only one window is active. So what can I do?
I can define a window group, which is a collection of windows. When I create a job, I can specify this window group as a schedule, and it will inherit the properties of the windows. I create a window group using the CREATE_WINDOW_GROUP procedure . For example, to create a window group named ALL_DAY as a collection of the three windows listed above, I issue the following code segment:
BEGIN
DBMS_SCHEDULER.create_window_group (
group_name => 'all_day',
window_list => 'MORNING, WORKDAY, EVENING',
comments => 'All day window group'
);
END;I can specify the names of all of the windows in the window group as a comma-separated list in the window_list parameter. I can also create a window group with no windows assigned to it yet. The parameter will be NULL in that case. This is useful when a window ...