PURGE_QUEUE_TABLE v13

Use the PURGE_QUEUE_TABLE procedure to delete messages from a queue table. The signature is:

PURGE_QUEUE_TABLE(
  <queue_table> IN VARCHAR2,
  <purge_condition> IN VARCHAR2,
  <purge_options> IN aq$_purge_options_t)

Parameters

queue_table

queue_table specifies the name of the queue table from which you are deleting a message.

purge_condition

Use purge_condition to specify a condition (a SQL WHERE clause) that the server will evaluate when deciding which messages to purge.

purge_options

purge_options is an object of the type aq$_purge_options_t. An aq$_purge_options_t object contains:

AttributeTypeDescription
blockBooleanSpecify TRUE if an exclusive lock should be held on all queues within the table; the default is FALSE.
delivery_modeINTEGERdelivery_mode specifies the type of message that will be purged. The only accepted value is DBMS_AQ.PERSISTENT.

Example

The following anonymous block removes any messages from the work_order_table with a value in the completed column of YES:

DECLARE
   purge_options dbms_aqadm.aq$_purge_options_t;
BEGIN
   dbms_aqadm.purge_queue_table('work_order_table', 'completed = YES',
purge_options);
  END;