 |
|
Oracle Tips by Burleson |
Chapter 4 -
Chaining Oracle Jobs Together
This chapter will introduce a number of techniques that can be used
to create dependencies between jobs and make job executions more
robust. An explanation of how a job chain is created is a good place
to start.
Creating a Job Chain
Jobs are often defined as individual tasks that
are performed in isolation; however, in some circumstances, a job
consists of several tasks that must be performed as a whole in a
specific sequence. Typically, this would be accomplished by
combining the tasks into a single job like the one defined below.
DBMS_SCHEDULER.create_job (
job_name => 'single_job',
job_type => 'PLSQL_BLOCK',
job_action => ‘BEGIN
task1;
task2;
task3;
END;’,
start_date => SYSTIMESTAMP,
repeat_interval => ‘freq=daily; byhour=9;
byminute=0; bysecond=0;’,
end_date => NULL,
enabled => TRUE,
comments => 'Single job.');
|
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|