简体   繁体   中英

Oracle Database 11g Express: associate job to window scheduler

I want to create a job and associate it to a couple of windows (WEEKNIGHT_WINDOW & WEEKEND_WINDOW), but I don't see any windows parameter in the Oracle doc. when creating a job:

DBMS_SCHEDULER.CREATE_JOB (
   job_name             IN VARCHAR2,
   job_type             IN VARCHAR2,
   job_action           IN VARCHAR2,
   number_of_arguments  IN PLS_INTEGER              DEFAULT 0,
   start_date           IN TIMESTAMP WITH TIME ZONE DEFAULT NULL,
   repeat_interval      IN VARCHAR2                 DEFAULT NULL,
   end_date             IN TIMESTAMP WITH TIME ZONE DEFAULT NULL,
   job_class            IN VARCHAR2                 DEFAULT 'DEFAULT_JOB_CLASS',
   enabled              IN BOOLEAN                  DEFAULT FALSE,
   auto_drop            IN BOOLEAN                  DEFAULT TRUE,
   comments             IN VARCHAR2                 DEFAULT NULL);

This is the Oracle version I am using:

Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE   11.2.0.2.0  Production"
TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

Under DBMS_SCHEDULER

The parameter you are looking for is:

schedule_name

The name of the schedule, window, or window group associated with this job.

I believe you can pass the window directly to the schedule_name, or you can do it the complicated way by:

CREATE_GROUP 

ADD_GROUP_MEMBER 

where you can add one or more windows to an existing window group (the old method was ADD_WINDOW_GROUP_MEMBER)

then pass the group to schedule_name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM