Solved

Dequeueing by message id

Posted on 2014-01-30
4
756 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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Cross Outer Join 4 52
Oracle Pivot 2 35
oracle report printing 2 pages in one page 2 38
PAYER_ID has both atributes 4 19
Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now