Predefined Job Classes with Oracle Scheduler
Autonomous Database includes predefined job_class
values to use
with Oracle Scheduler.
The predefined
job_class
values, TPURGENT
,
TP
, HIGH
, MEDIUM
and LOW
map to the corresponding consumer groups. These job
classes allow you to specify the consumer group a job runs in with
DBMS_SCHEDULER.CREATE_JOB
.
The DBMS_SCHEDULER.CREATE_JOB
procedure supports
PLSQL_BLOCK
and STORED_PROCEDURE
job types for the job_type
parameter in Autonomous Database.
For example: use the following to create a single regular job to run
in HIGH
consumer group:
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'update_sales',
job_type => 'STORED_PROCEDURE',
job_action => 'OPS.SALES_PKG.UPDATE_SALES_SUMMARY',
start_date => '28-APR-19 07.00.00 PM Australia/Sydney',
repeat_interval => 'FREQ=DAILY;INTERVAL=2',
end_date => '20-NOV-19 07.00.00 PM Australia/Sydney',
auto_drop => FALSE,
job_class => 'HIGH',
comments => 'My new job');
END;
/
Notes for Oracle Scheduler:
-
To use
DBMS_SCHEDULER.CREATE_JOB
additional grants for specific roles or privileges might be required. TheADMIN
user and users withDWROLE
have the requiredCREATE SESSION
andCREATE JOB
privileges. If a user does not haveDWROLE
then grants are required forCREATE SESSION
andCREATE JOB
privileges. -
The
instance_id
job attribute is ignored for Oracle Scheduler jobs running on Autonomous Database.
See Scheduling Jobs with
Oracle Scheduler for more information on Oracle Scheduler and
DBMS_SCHEDULER.CREATE_JOB
.
See SET_ATTRIBUTE Procedure for information on job attributes.
Parent topic: Manage Concurrency and Priorities on Autonomous Database