Showing posts with label Advance Queue. Show all posts
Showing posts with label Advance Queue. Show all posts

Friday, October 13, 2017

PURGE_QUEUE_TABLE

This procedure purges messages from queue tables. You can perform various purge operations on both single-consumer and multi consumer queue tables for persistent and buffered messages

Syntax

DBMS_AQADM.PURGE_QUEUE_TABLE(
   queue_table        IN   VARCHAR2,
   purge_condition    IN   VARCHAR2,
   purge_options      IN   aq$_purge_options_t);


Parameters Table:PURGE_QUEUE_TABLE Procedure Parameters



Usage Notes
You an purge selected messages from the queue table by specifying a purge_condition. Table 22-35 describes these parameters. Messages can be enqueued to and dequeued from the queue table while the queue table is being purged.
A trace file is generated in the udump destination when you run this procedure. It details what the procedure is doing.
This procedure commits batches of messages in autonomous transactions. Several such autonomous transactions may get executed as a part of one purge_queue_table call depending on the number of messages in the queue table.

Sample Code : 

DECLARE
 purge_opt_t dbms_aqadm.aq$_purge_options_t;
BEGIN
  dbms_aqadm.purge_queue_table('<OWNER.QUEUE_TABLE_NAME', NULL, purge_opt_t);
END;
/