|
 |
|
Oracle Tips by Burleson |
Chapter 4 -
Chaining Oracle Jobs Together
Conditional Job Enabling
SQL> @job_chain_query.sql
no rows selected
SQL> @job_queue_query.sql
USER_SCHEDULER_JOBS
JOB_NAME ENABL NEXT_RUN_DATE
--------------------------- -----
----------------------------------
JOB_CHAIN_ENABLE_TASK_1 TRUE 08-AUG-2004
06:00:00.800000 +01:00
JOB_CHAIN_ENABLE_TASK_2 FALSE
JOB_CHAIN_ENABLE_TASK_3 FALSE
3 rows selected.
At this point, the first task is scheduled but
has not been executed, hence no results in the job_chain
table. Rather than waiting until 6:00, it can be forced to run
immediately. The results below show that the first task has run,
and the second job has been enabled.
SQL> exec dbms_scheduler.run_job
('job_chain_enable_task_1');
PL/SQL procedure successfully completed.
SQL> @job_queue_query.sql
|