Invalid Queue Rule Set After DBMS_AQADM.PURGE_QUEUE_TABLE

In 11.2, after manually purged the message queue, some queue rule sets might become Invalid.

before purging the queue.

SQL> select object_type, object_name       
      from dba_objects       
      where owner='SYS' and status!='VALID'; 

no rows selected

Purge the queue table.

SQL> DECLARE         
       po dbms_aqadm.aq$_purge_options_t;      
     BEGIN         
       po.block := FALSE;         
       DBMS_AQADM.PURGE_QUEUE_TABLE
            ( queue_table => 'SYS.SYS$SERVICE_METRICS_TAB',
          purge_condition => NULL,         
            purge_options => po); 
     END; 

/  

PL/SQL procedure successfully completed.

Check the Invalid objects again.

SQL> select object_type, object_name       
       from dba_objects      
      where owner='SYS' and status!='VALID'; 

OBJECT_TYPE           OBJECT_NAME
 -------------------  --------------------------
 RULE SET             SYS$SERVICE_METRICS_N

Recompile the invalid objects.

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

SQL> select object_type, object_name
from dba_objects
where owner='SYS' and status!='VALID';

no rows selected

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: