 |
|
Oracle Tips by Burleson |
Chapter 4 -
Chaining Oracle Jobs Together
Conditional Job Runs Using Oracle Advanced
Queuing
Messages are queued and de-queued using the dbms_aq package.
Access to this package can be granted using the aq_user_role
role. However, access to it from a stored procedure is achieved by
using the job_chain_aq_setup.sql script, which grants the
privilege on this object directly to the test user.
The contents of the queue table can be
monitored using the job_chain_aq_query.sql script.
job_chain_aq_query.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
--
*************************************************
select
queue,
count(*) as messages
 |
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. |
|