DBMS_AQADM.PURGE_QUEUE_TABLE Unable to Remove 'EXPIRED INMEMORY' Messages (Doc ID 729858.1)

Last updated on NOVEMBER 04, 2014

Applies to:

Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2]
Information in this document applies to any platform.
Checked for currency 01-Mar-12


Symptoms

A buffered message which has been enqueued for a recipient or a default subscriber cannot be purged using the dbms_aqadm.purge_queue_table procedure after it has been moved to the exception queue.

The behaviour observed will be as follows

SQL> select msg_state, queue, consumer_name from aq$QT_TEST;

MSG_STATE                     QUEUE     CONSUMER_NAME
----------------                   ---------     -------------
EXPIRED INMEMORY    Q_TEST    TEST1

SQL> declare
2 po dbms_aqadm.aq$_purge_options_t;
3 begin
4 po.block := true;
5 dbms_aqadm.purge_queue_table(queue_table => 'QT_TEST',purge_condition =>
6 'qtview.msg_state=''EXPIRED INMEMORY''',purge_options => po);
7 end;
8 /

PL/SQL procedure successfully completed.

SQL> select msg_state, queue, consumer_name from aq$QT_TEST;

MSG_STATE                  QUEUE    CONSUMER_NAME
----------------                 -------      -------------
EXPIRED INMEMORY  Q_TEST  TEST1

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms