Title: Jerry Held
1(No Transcript)
2SCHEDULING IN ORACLE DATABASE 10G
40165
- Vira GoorahProduct Manager
- Oracle Corporation
3What is a Job?
What
Schedule
Job Attributes
Job
Arguments
4Scheduler Solution
Schedule
Program
Job
5Job Instance
Run CALC_STATSevery two hours
Execute jobat 1000 am
Execute jobat 1200 pm
800 am
1000 am
1200 pm
200 pm
6Specifying Schedules for a Job
- Defines a time for
- Starting a job
- Repeat interval or the next time the job executes
- Ending repeating job executions
- Example schedules
- Wed, December 26th, 2002 at 200 pm
- Every Monday at 800 am, starting on January
29th, 2003 and ending on March 31st, 2003 - Every fourth Thursday
7Defining Repeat Intervals for a Schedule
One TimeJob
Start Time
Schedule
Repeating Job
End Time or Limit
- Examples
- Starting now, run the job every 2 hours
- Starting on April 2, 2003, run every 6 hours
until midnight on April 15th, 2003. - Run on the last Sunday of every other month at
800 pm
8Calendaring Expressions
BYMONTH BYWEEKNO BYYEARDAY BYMONTHDAY BYDAY BYHOUR
BYMINUTE BYSECOND
YEARLY MONTHLY WEEKLY DAILY HOURLY MINUTELY SECOND
LY
INTERVAL(1-99)
Interval
Frequency
Specifiers
9Advanced Scheduler Components
Job Class
Window
Schedule
Job
Program
Arguments
Arguments
10What is a Job Class?
11What is a Job Class?
Job Class
EXECUTE DBMS_SCHEDULER.CREATE_JOB_CLASS( -
job_class_name gt 'ADMIN_JOBS', -
resource_consumer_group gt 'DAYTIME_JOBS', -
service gt 'SERVICE_B')
12Scheduler Components
Job
V
Window Group
V
V
Window
Schedule
V
V
Resource Plan
13Window Concepts
Window
Resource Plan
Window Group
V
V
V
14Using Resource Plans with Windows
Window with Resource Plan
Job Class A Consumer Group CG1
Job1
Job2
Consumer Group CG1
Default Consumer Group
15Window Groups
16Prioritizing Jobs within a Window
Daytime Window
APPL_JOBS
Job1
Job2
OTHER
Job3
ADMIN_JOBS
Job4
Job5
17Jobs and Services
INST1
INST2
INST3
Service_A
Service_AService_B
Service_B
Service_A APPL_JOBS
Service_B ADMIN_JOBS
Job1
Job2
Job3
Job4
18Scheduler Interface
- BEGIN
- DBMS_SCHEDULER.CREATE_JOB(
- job_namegt'ADMIN.GET_STATS2',
- program_namegt'ADMIN.CALC_STATS2',
- start_dategt'20-NOV-03 07.00.00.000000
AM -0700', - repeat_intervalgt'SYSDATE2/24')
- END
- /
19A
20Reminder please complete the OracleWorld
online session surveyThank you.
21(No Transcript)