Predefined Job Classes with Oracle Scheduler
Autonomous AI 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 AI 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_JOBadditional grants for specific roles or privileges might be required. TheADMINuser and users withDWROLEhave the requiredCREATE SESSIONandCREATE JOBprivileges. If a user does not haveDWROLEthen grants are required forCREATE SESSIONandCREATE JOBprivileges. -
The
instance_idjob attribute is ignored for Oracle Scheduler jobs running on Autonomous AI 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.