Which three statements correctly describe the relationship amongst jobs, programs, and
schedules within the Oracle Job Scheduler?
A.
A job is specified as part of a program definition.
B.
A program can be used in the definition of multiple jobs.
C.
A program and job can be specified as part of a schedule definition.
D.
A program and schedule can be specified as part of a job definition.
E.
A program and window can be specified as part of a job definition.
Explanation:
Reference:
http://docs.oracle.com/database/121/ADMIN/schedover.htm#ADMIN13371
B,D,E
Why??
B D E is correct !
C is wrong and you can create a job where the schedule is a window.
In fact I always create a job for periodic cleaning of audit trail records with more than x days using the MAINTENANCE_WINDOW_GROUP
here :
BEGIN
sys.dbms_scheduler.create_job(
job_name => ‘AUDIT_PURGE’,
job_type => ‘PLSQL_BLOCK’,
job_action => ‘begin purge_audit_trail; end;’,
schedule_name => ‘MAINTENANCE_WINDOW_GROUP’,
job_class => ‘”DEFAULT_JOB_CLASS”‘,
comments => ‘Audit Trail Purge’,
auto_drop => FALSE,
enabled => TRUE);
END;
/
Thanks Vonpire!
B for sure š
A program can be used in the definition of multiple jobs.
C is not
A schedule object (schedule) specifies when and how many times a job is run. Schedules can be shared by multiple jobs. For example, the end of a business quarter may be a common time frame for many jobs. Rather than defining an end-of-quarter schedule each time a new job is defined, job creators can point to a named schedule.
D is for sure
you can create a job that points to a program object (program) to specify the job action, a schedule object (schedule) to specify the repeat interval, or both a program and schedule.
http://docs.oracle.com/database/121/ADMIN/scheduse.htm#CHDBEDBG
E is Vonphire script
BEGIN
sys.dbms_scheduler.create_job(
job_name => āAUDIT_PURGEā,
job_type => āPLSQL_BLOCKā,
job_action => ābegin purge_audit_trail; end;ā,
schedule_name => āMAINTENANCE_WINDOW_GROUPā,
job_class => āāDEFAULT_JOB_CLASSāā,
comments => āAudit Trail Purgeā,
auto_drop => FALSE,
enabled => TRUE);
END;
/
The explain :
Windows
You typically create windows only when you are in the role of Scheduler administrator.
You create windows to automatically start jobs or to change resource allocation among jobs during various time periods of the day, week, and so on. A window is represented by an interval of time with a well-defined beginning and end, such as “from 12am-6am”.
Windows work with job classes to control resource allocation. Each window specifies the resource plan to activate when the window opens (becomes active), and each job class specifies a resource consumer group or specifies a database service, which can map to a consumer group. A job that runs within a window, therefore, has resources allocated to it according to the consumer group of its job class and the resource plan of the window.
Figure 28-2 shows a workday that includes two windows. In this configuration, jobs belonging to the job class that links to Consumer Group 1 get more resources in the morning than in the afternoon. The opposite is true for jobs in the job class that links to Consumer Group 2.
Figure 28-2 Windows help define the resources that are allocated to jobs
Description of Figure 28-2 follows
Description of “Figure 28-2 Windows help define the resources that are allocated to jobs”
See Chapter 27, “Managing Resources with Oracle Database Resource Manager” for more information on resource plans and consumer groups.
You can assign a priority to each window. If windows overlap, the window with the highest priority is chosen over other windows with lower priorities. The Scheduler automatically opens and closes windows as window start times and end times come and go.
A job can name a window in its schedule_name attribute. The Scheduler then starts the job when the window opens. If a window is already open, and a new job is created that points to that window, the new job does not start until the next time the window opens.
BDE
A job is the combination of a schedule and a program
BDE
BDE