Hi guys
I have an issue with a queue. We had to change the underlying type, which I did, but then the queue became invalid.
The queue was defined as:
DBMS_AQADM.CREATE_QUEUE_TABLE (
QUEUE_TABLE =>'QUERCUS.TRANSACTION_OUT_QT',
QUEUE_PAYLOAD_TYPE =>'transaction_out_queue_type',
SORT_LIST => 'priority, enq_time',
multiple_consumers => TRUE);
DBMS_AQADM.CREATE_QUEUE (
queue_name => 'QUERCUS.TRANSACTION_OUT',
queue_table => 'QUERCUS.TRANSACTION_OUT_QT',
QUEUE_TYPE => SYS.DBMS_AQADM.NORMAL_QUEUE,
MAX_RETRIES => 10,
RETRY_DELAY => 10,
RETENTION_TIME => 0);
I had to change the type (actually these are nested types), anyway at the end I could normally compile the type used by the queue:
alter type transaction_out_queue_type compile;
/
Here comes the trouble.
The queue was invalid and I couldn't drop it because I was getting and oracle internal error.
I followed the advice contained here:
deleting stuff in our system tables:
delete from system.aq$_queue_tables where objno=(select objno from system.aq$_queue_tables where name='TRANSACTION_OUT_QT');
delete from system.aq$_queues where table_objno=(select table_objno from system.aq$_queues where name ='TRANSACTION_OUT');
delete from sys.AQ$_QUEUE_TABLE_AFFINITIES where table_objno=95495;
delete from SYS.EXPDEPACT$ where obj#=95495;
delete from sys.obj$ where name like '%TRANSACTION_OUT%'
and owner# in (1,136,139)
and ctime < trunc(sysdate-1);
And I was finally able to drop force the queue:
begin
dbms_aqadm.drop_queue_table('QUERCUS.TRANSACTION_OUT_QT',force => true);
end;
At this point I was almost done, I only needed to recreate it, but now when I try to recreate it:
begin
DBMS_AQADM.CREATE_QUEUE_TABLE (
QUEUE_TABLE =>'QUERCUS.TRANSACTION_OUT_QT',
QUEUE_PAYLOAD_TYPE =>'transaction_out_queue_type',
SORT_LIST => 'priority, enq_time',
multiple_consumers => TRUE);
end;
I get an error oracle no_Data_found in DBMS_AQADM at line 115.
At this point I have no queue and I also cannot create it again. I could create it with a different name but that's not what we want.
Could anybody help me out please?