Solved

Dequeueing by message id

Posted on 2014-01-30
4
803 Views
Last Modified: 2014-02-02
I'm attempting to dequeue a specific message by its message ID using PL/SQL.

I retrieve the message ID from the queue table, but when I run the dequeue, I get
ORA-25263, no message in queue SCHEMA.QUEUE with message ID C0C68C7D93694022A93157ED55406D53"

What am I doing wrong? I also tried hextoraw() on the msgid but that made no difference.
script.sql
0
Comment
Question by:Elisas
  • 2
  • 2
4 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 39821485
See if the following note from Oracle Support helps:
ORA-25263 Returned While Dequeueing a Message From AQ Using DBMS_AQ.NO_WAIT option (Doc ID 1344845.1)

It is for NO_WAIT but based on the online docs you are only waiting 1 second so it might be the same thing.
0
 

Author Comment

by:Elisas
ID: 39823924
A greater delay does not seem to make a difference (I've tried as long as 10 minutes).

I have no access to the trace file so I cannot confirm or deny an ORA-00054 as the doc you're referring to suggests, but there are no other processes working on the queue so I don't see why there would be a lock.
Also, dequeueing the entire queue without specifying a message id works just fine.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39823966
Sorry but that is all the information I can locate.

If you have a test case that creates the queue, enqueues a message then tries to dequeue, I'll be happy to run it on me development database to see if I can reproduce what you are seeing and attempt to figure out the issue.

If not, I suggest you open an SR with Oracle Support.  They will have the necessary tools to help you troubleshoot this and trace properly if necessary.
0
 

Author Comment

by:Elisas
ID: 39828814
I realized what went wrong as I was making a test case. Now I just feel stupid.

Since I'm dequeueing in a loop, the message is gone on the 2nd iteration. Since an exception then is thrown, the queue is apparently rolled back.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question