Oracle® Database Administrator's Guide 11g Release 2 (11.2) Part Number E10595-04 |
|
|
View PDF |
DBMS_JOB
is a PL/SQL package that you use to schedule jobs. It is replaced by Oracle Scheduler, which is more powerful and flexible. Although Oracle recommends that you switch from DBMS_JOB
to Oracle Scheduler, DBMS_JOB
is still supported for backward compatibility.
The JOB_QUEUE_PROCESSES
initialization parameter specifies the maximum number of processes that can be created for the execution of jobs. Beginning with Oracle Database release 11g, JOB_QUEUE_PROCESSES
defaults to 1000. The job coordinator process starts only as many job queue processes as are required, based on the number of jobs to run and available resources. You can set JOB_QUEUE_PROCESSES
to a lower number to limit the number of job queue processes. Setting JOB_QUEUE_PROCESSES
to 0 disables DBMS_JOB
.
DBMS_JOB
and Oracle Scheduler (the Scheduler) use the same job coordinator to start job queue processes. (For the Scheduler, these processes are called job slave processes. This section uses these terms interchangeably.) Although you typically use the JOB_QUEUE_PROCESSES
initialization parameter to limit the number job queue processes for DBMS_JOB
and you use the Scheduler attribute max_job_slave_processes
to limit the number of job slave processes for the Scheduler, the Scheduler is affected by the JOB_QUEUE_PROCESSES
parameter.
The maximum number of job slave processes for Scheduler is determined by the lesser of the values of JOB_QUEUE_PROCESSES
and max_job_slave_processes
. For example:
If JOB_QUEUE_PROCESSES
is set to 10 and max_job_slave_processes
is set to 20, the job coordinator will start no more than 10 job slave processes to be shared between DBMS_JOB
and the Scheduler.
If JOB_QUEUE_PROCESSES
is 20 and max_job_slave_processes
is 10, the coordinator will start up to 20 job slave processes. The Scheduler can use only 10 of these, but DBMS_JOB
can use all 20.
If JOB_QUEUE_PROCESSES
is 0, DBMS_JOB
is disabled, and the maximum number of job slave processes for Scheduler is controlled by the max_job_slave_processes
Scheduler attribute.
See Also:
Oracle Database Reference for more information about the JOB_QUEUE_PROCESSES
initialization parameter