|
 |
|
Oracle Tips by Burleson |
Chapter 4 -
Chaining Oracle Jobs Together
Conditional Job Creation
SQL> job_chain_query.sql
CREATED_TIMESTAMP TASK_NAME
--------------------------
--------------------
07-AUG-2004 11:10:42.746000 TASK_1
07-AUG-2004 11:12:42.956000 TASK_2
2 rows selected.
Conditional Job Enabling
In this method, all tasks in the chain are
scheduled as regular repeating jobs, but only the first job in the
chain is enabled. All subsequent jobs in the chain are disabled or
marked as broken prior to Oracle10g. As each task in the chain
completes successfully, it enables the next task in the chain by
enabling its associated job. Every time the first task runs, it
disables the chain before starting again.
The job_chain_enable.sql script creates
a package specification and body that will do all the work for the
example job chain.
job_chain_enable.sql
--
CREATE OR REPLACE PACKAGE job_chain_enable AS
|