Solved

Dequeueing by message id

Posted on 2014-01-30
4
852 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 77

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 77

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

738 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