|
About the Oracle dbms_aq DBA package
Let us look at an example of
enqueue and dequeue with the dbms_aq package.
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;
/
|
Next is an
example showing the array
dequeue with a PL/SQL block:
DECLARE
deq_cnt PLS_INTEGER;
deq_opt
DBMS_AQ.dequeue_options_t;
mesg_props
DBMS_AQ.message_properties_array_t;
parray OE.addr_nest_tab_typ;
msgidarray DBMS_AQ.msgid_array_t;
BEGIN
deq_cnt := DBMS_AQ.DEQUEUE_ARRAY
(
queue_name => 'IX.ORDERS_QUEUE',
dequeue_options => deq_opt,
array_size => 20,
message_properties_array =>
mesg_props,
payload_array => parray,
msgid_array => msgidarray);
-- Process parray here ---
END; |
|
If you want to understand the internals of Oracle
replications, I recommend these tight-focus
reference books:
Also see:
|