Oracle Scheduler Overview
By default, the Oracle 11g job coordinator
process is not always running.
It is started and stopped, as required.
If the database detects any jobs that
must be executed or windows opened in the near
future, the job coordinator background process
If there is no current job activity and
no open windows, the job coordinator is stopped.
The job coordinator
spawns as many job slaves (j000 to j999) as are
needed to execute the outstanding jobs.
A job slave
from the scheduler tables to enable it to
execute a job.
Upon completion of a job, the slave
process updates any relevant information in the
job table, inserts data into the job run history
and requests another job from the job
If a job is not available, the job slave
sleeps until there is work to do.
The job coordinator periodically
terminates idle job slaves to reduce the slave
The job table
used by the scheduler is implemented using
Oracle Advanced Queuing
and the supporting tables listed below:
table_name like '%SCHEDULER$_JOB%'
In addition to the conceptual job table,
the scheduler uses several other tables to store
about scheduler objects.
table_name like '%SCHEDULER$%'
table_name not like
Under normal circumstances, one would not expect
to interact with any of the scheduler tables
Information about the scheduler is
displayed using the
views, and the
package is used for the creation and
manipulation of several scheduler objects
- Components that define repeat intervals,
allowing several jobs and windows to share a
single schedule definition
- Components that define the work done by a
job, allowing multiple jobs to share a
- Scheduled jobs that can be defined as
individual entities or defined using
existing schedules and programs
- Logical groupings of jobs that have
similar resource and administration
Job classes provide a link between
the scheduler and the resource manager.
- Components that define a period of time
and link it to a specific resource plan,
allowing the automatic control of system
resources allocated to scheduled jobs.
- Logical grouping of windows
These scheduler objects and the usage of the
package are presented in greater detail.
However, the following example demonstrates how
a simple job can be scheduled in Oracle.
=> 'BEGIN NULL; /* Do Nothing */
repeat_interval => 'SYSTIMESTAMP + 1
/* 1 Day */');
The above example is the Oracle 11g equivalent
of the job defined in the previous Oracle 9i
From a quick look at this example, one
might conclude that there is little difference
between the old and the new schedulers; however,
that would be an incorrect assumption.
For backwards compatibility, it is possible to
schedule jobs using both the
packages in Oracle 11g.
When jobs are scheduled using the
dbms_job package, they are still
dependent on the
When this parameter is set to zero, jobs
scheduled using the
dbms_job package will not run, but
those scheduled using the
dbms_scheduler package will still
If the parameter is set to a non-zero value, the
will run permanently, but the value will only
constrain the number of job slaves that can be
started to run jobs scheduled using the
The value has no affect on the number of
processes that are allocated to jobs scheduled
r more details on Oracle utilities, see the book "Advanced
Oracle Utilities" by Bert Scalzo, Donald K. Burleson, and Steve Callan.
You can buy it direct from the publisher for 30% off directly from