Databases Reference
In-Depth Information
Job Chains : Scheduling a single task can be relatively easily done, it can be
scheduled to be run at a specific point in time, or, as previously seen, it can be
triggered after a specific event is raised. But when a task depends on other tasks to be
completed before they can be scheduled, or if a task is to be conditionally scheduled,
a complex shell script must be prepared.
Time Schedule : This is the most frequently used schedule. Normally the tasks are
scheduled at a given point in time, which can occur once or on a repetition basis. A
time expression is required to define when the task will be executed.
Event Schedule : A Job cannot only be scheduled by a time expression, but also by
a non-deterministic situation. Assuming a file arrives around 2:00 a.m., but not at a
precise point in time, if a chain process is waiting for this event to start just in time,
then a regular schedule may either start too early or too late, and would not be a
convenient way to schedule the file processing job. An event-based schedule is more
suitable for this scenario, this way we will always know that a process chain won't
start unless the required triggering condition is met.
An event-based schedule requires a queue specification and an event condition to
be met.
Getting started with the Oracle Scheduler
There are a number of database privileges and properties that need to be set for a
user to be able to access and utilize the Scheduler. Once the user has been granted
the proper privileges they are ready to use the DBMS_SCHEDULER package.
Required privileges
In order for you to create a new job manager you must grant the
SCHEDULER_ADMIN role.
GRANT SCHEDULER_ADMIN TO <username>;
This role provides a lot of power for a regular user, allowing the grantee to run
any code. If this happens to be a regular user who will launch its own jobs, then it
should be granted the CREATE JOB privilege. This allows the grantee to create jobs,
schedules, and programs in its own schema.
GRANT CREATE JOB TO <username>;
 
Search WWH ::




Custom Search