 |
|
Oracle Tips by Burleson |
Chapter 4 -
Chaining Oracle Jobs Together
Conditional Job Creation
In the order and billing example, the time between tasks was long
and the run times were fixed, excluding delays. An example like
this would not be very useful here since it would require a
significant amount of time for the chain to complete successfully.
Instead, assume that a process made up of three tasks must run in
sequence. For the purposes of testing, the times between tasks
should be relatively short and instead of fixed times, rolling times
should be used.
In this example, each task will simply insert a
record into a table, which can be created using the following script:
job_chain_table.sql
--
*************************************************
-- Copyright © 2005 by Rampant TechPress
-- This script is free for non-commercial
purposes
-- with no warranties. Use at your own risk.
--
-- To license this script for a commercial
purpose,
-- contact info@rampant.cc
--
*************************************************
CREATE TABLE job_chain (
created_timestamp TIMESTAMP,
task_name VARCHAR2(20)
);
The job_chain_create.sql script creates
a package specification and body that will do all the work for the
example job chain.
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|