| |
 |
|
Oracle Tips by Burleson |
Chapter 4 -
Chaining Oracle Jobs Together
Conditional Job Runs Using Oracle Advanced
Queuing
-- Uncomment the following line to force a failure.
--RAISE_APPLICATION_ERROR(-20000,
-- 'This is a fake
error to prevent task_3 being executed');
-- The work has completed successfully so
signal task_3
enqueue_message (p_queue_name =>
'task_3_queue');
EXCEPTION
WHEN OTHERS THEN
-- Don't signal task_3.
NULL;
END task_2;
--
-----------------------------------------------------------------
--
-----------------------------------------------------------------
PROCEDURE task_3 AS
--
-----------------------------------------------------------------
BEGIN
dequeue_message (p_queue_name =>
'task_3_queue');
INSERT INTO job_chain (created_timestamp,
task_name)
VALUES (systimestamp, 'TASK_3');
COMMIT;
 |
For more details and scripts, see my new book "
Oracle
Tuning: The Definitive Reference", over 900 pages
of BC's favorite tuning tips & scripts.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot. |
|