Unable to Deque from a Queue

Posted on 2012-09-11
Last Modified: 2012-11-07

We have a queue in our system which is behaving weird.

We are unable to deque from the queue, whenever we try to deque we get a exception of
ORA-25235: fetched all messages in current transaction

where in there are messages still lying in the queue..

had used this script to deque..

/* Formatted on 2012/09/11 17:26 (Formatter Plus v4.8.8) */
   R_dequeue_options      DBMS_AQ.Dequeue_Options_T;
   r_message_properties   DBMS_AQ.Message_Properties_T;
   V_Message_Handle       RAW (16);
   O_payload               SYS.MGW_BASIC_MSG_T;
r_dequeue_options.Wait := Dbms_Aq.No_Wait;
   --Start-SP added for multple consumer queue(AQ)
   r_dequeue_options.consumer_name := 'VEL_AQ_OU_QUEUE_SUB';
   --Each time a select query is fired on the queue when first_message option is used
   r_dequeue_options.navigation := Dbms_Aq.First_Message;                --sp

   DBMS_OUTPUT.put_line ('Begin');
   DBMS_AQ.dequeue (queue_name              => 'AQADMIN.VEL_AQ_OU_QUEUE',
                    dequeue_options         => r_dequeue_options,
                    message_properties      => r_message_properties,
                    Payload                 => o_payload,
                    msgid                   => v_message_handle

the same script is working fine with rest of queues..
Question by:Wasim Akram Shaik
    LVL 1

    Accepted Solution

    try to drop and recreate the queue.. along with the queue table
    LVL 16

    Author Closing Comment

    by:Wasim Akram Shaik
    yes.. we did the same to resolve this error..
    thanks for the input...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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.

    Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
    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…
    This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
    This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

    759 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

    8 Experts available now in Live!

    Get 1:1 Help Now