 |
|
Oracle Tips by Burleson |
Oracle 10g Advance Queue Enhancements
Advanced Queuing has been integrated into Oracle
Streams, and is now called Oracle Streams Advanced Queuing (AQ).
Oracle Streams AQ supports all existing AQ functionality and more.
The following summarizes the new features and enhancements added to
the dbms_aq package.
-
A new package called dbms_aqadm is introduced.
-
New AQ Type message_properties_t_array type
-
message_properties_t type has an additional
attribute, transaction_group.
-
New JMS Types and added functionality to
existing types
With the help of the enqueue_array procedure,
you can enqueue an array of payloads, using a corresponding array of
message properties. And you can use the dequeue_array function to
dequeue an array of payloads and a corresponding array of message
properties.
Let us look at an example of enqueue and deque.
DECLARE
enq_cnt PLS_INTEGER;
enq_opt DBMS_AQ.enqueue_options_t;
mesg_props DBMS_AQ.message_properties_array_t;
parray OE.addr_nest_tab_typ;
msgidarr DBMS_AQ.msgid_array_t;
BEGIN
-- Add code here to populate the array --
--
enq_cnt := DBMS_AQ.ENQUEUE_ARRAY
(queue_name => 'IX.ORDERS_QUEUE',
enqueue_options => enq_opt,
array_size => 20,
message_properties_array => mesg_props,
payload_array => parray,
msgid_array => msgidarr);
END;
/
In the example above, the message payloads are
taken from the specified structure, such as the nested table
oe.addr_nest_tab_typ. The function returns the number of messages
successfully enqueued.
Get the complete Oracle10g story:
To get the code instantly, click here:
Need an Oracle Mentor?
BEI is now offering personal mentors for Oracle DBAs where you can have an
Oracle expert right at your fingertips, anytime day or night. We work with
hundreds of Oracle databases every year, so we know exactly how to quickly
assist you with any Oracle question.
Why risk an unplanned outage? You can now get telephone access to Don
Burleson or any of his Oracle Certified DBAs with more than 20 years of
full-time IT experience. Click here for details:
http://www.dba-oracle.com/service_oracle_backup.htm

|