11-6. Scheduling a Job Chain

Problem

You have several PL/SQL procedures that must run in a fixed sequence—some steps sequentially, others in parallel. If one step fails, processing should stop.

Solution

Use the DBMS_SCHEDULER _CHAIN commands to create and define the order of execution of the chained procedures. Figure 11-1 depicts a simple example of a chain of procedures where the successful completion of step 1 kicks off parallel executions of two additional steps. When the two parallel steps compete successfully, the final step runs.

Image

Figure 11-1. Flowchart representation of a job chain.

The following code shows how you can use the CREATE_CHAIN ...

Get Oracle and PL/SQL Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.