11gR2: Message state after dequeue in AQ$ queue_table view

Dear all,
we are in the process of migrating from 10gR2 to 11gR2 and encountered the following problem.
We send messages over an advanced queue to 1 to n recipients.
After dequeuing the message we query the AQ$<queue_table> view to determine if the specified message is processed by all recipients (msg_state should be 'PROCESSED' in my opinion).
This worked fine in Oracle 10g (and 9i).
In our 11gR2 (11.2.0.1) test system we encounter now the problem that the message still has the msg_state 'READY' in the AQ$<queue_table> view after dequeuing the message (we encounter that behaviour with one recipient).
After a bit of trying we also found out that the view shows the (in my opinion correct) msg_state 'PROCESSED' after committing the transaction. But we query the view right after the dequeue in the same procedure, so I hope also the same transaction :).
Please find following the enqueue and dequeue options we use:
The enqueue options are the default ones, we make no changes:
ENQ_OPT DBMS_AQ.ENQUEUE_OPTIONS_T;
Here the dequeue options that we set:
DEQ_OPT DBMS_AQ.DEQUEUE_OPTIONS_T;
deq_opt.consumer_name := agent_name; -- This is correct, we definitely get the message
deq_opt.dequeue_mode := dbms_aq.REMOVE;
deq_opt.wait := 2;
deq_opt.navigation := dbms_aq.FIRST_MESSAGE;
deq_opt.correlation := p_order_id; -- This must also be correct as we get the correct message (It also happens if only one message is in the queue)
This is how we determine the state of the message:
SELECT count(*)
INTO msg_count
FROM aq$test_qt
WHERE corr_id = p_order_id
AND msg_state != 'PROCESSED';
Maybe we overlooked some changes between 10g and 11g. We would be thankful for every hint.
Thanks in advance
Hansi

Hi!
Thanks for your tips.
Yes, I reread the documentation for 11gR2 and I couldn't find a change that could lead to a change in this behaviour.
It states regarding the visibility attribute of the dequeue options:
"ON_COMMIT: The dequeue will be part of the current transaction. This setting is the default."
I think we will now go on with installing patch set 11.2.0.2.
Thanks again
Hansi
PS:: It's still me. Just logged in from a colleague's account. :)
Edited by: user4819656 on 05.02.2011 00:39

Similar Messages

  • Iphone loads negative messages (-5, eg) and not able to view mail

    My mail is acting so weird - my red circle on the mail icon always shows negative new messages (-4 or -8, etc.).
    I deleted the account and re-input my info and saw it load all the messages, but after loading, none can be viewed.. it actually seems locked up. It only displays ONE message - the most recent, but I can't even open that.
    I was running 2.0.1. Same result after I updated to 2.0.2
    I have restarted the iphone, reset network settings, reset the phone - all to no avail! Is it just broken?

    I'm in the same boat and currently on hold with Apple - aaarrrgggghhh! My email is a Verizon account (POP). Connection doctor tells me everything is connecting, I've downloaded the most recent mail update, and I've tried many solutions posted on forums that have not worked. The mail icon is in the dock but does nothing when selected. When I manually open up the mailbox through File>New Viewer Window, all mailboxes are there but are empty. Any ideas? Am I looking at an archive and install? Thanks!

  • Message state remain 0 after dequeued

    I have a multiple consumer queue which used to work fine.
    But recently even after all consumers have dequeued the message, message state remains 0 (should be 2).
    I've verified that there is no more consumer. Could this be somehow there is a hidden consumer somewhere? or any other reason?
    Thx,

    Can you verify that the init.ora parameter aq_tm_processes is at least 1? This parameter ensures the QMN (Queue Monitor process) to be available. This process is responsible for updating states etc.

  • Message state remains READY after DEQueue of AQAdapter with Mediator

    With Mediator as a dispatcher, the inbound of AQAdapter is deQueued and use the mediator rule to invoke the BPEL processes in parallel. Inside the BPEL process, the catch-all is used to catch all the Fault and also using Fault Policy to catch all the system fault. The instance is complete and the fault email notification is working but the Queue message state remains READY in the queue table. Any missing? Please Advice. Thanks!

    Are you saying you have messages in the AQ that are not getting dequeued from mediator?
    Have you checked that the Datasource has been configured correctly and the AQ adapter has been deployed with the right datasource settings.
    Are you seeing anything in the logs.
    cheers
    James

  • Message in WAIT state after DELAY_TIMESTAMP is in the past

    The queue's view DELAY_TIMESTAMP column appears to have the correct time, but when compared to SYSTIMESTAMP, there's an unexpected five hour difference. After the message should have gone to the READY state, it is still in the WAIT state.
    For example, a message is enqueued using DBMS_AQ.ENQUEUE with delay of 60 seconds. I wait till well after the message should be dequeued. The message is still in the queue despite attempting to dequeue it with DBMS_AQ.DEQUEUE. Here is what the query looks like.
    select delay_timestamp, systimestamp , delay_timestamp - systimestamp
    from AQ$THE_QUEUE;
    DELAY_TIMESTAMP = 7/1/2009 8:23:05.769546 PM
    SYSTIMESTAMP = 7/1/2009 9:06:23.944861 PM +00:00
    DELAY_TIMESTAMP-SYSTIMESTAMP +00 04:16:41.824685
    The difference should be negative because the time should have expired. However, it's positive, 5 hours less the time since it was enqueued.
    This code worked fine until it was re-installed as part of dropping and creating the Oracle user. It works fine on Oracle XE and other Oracle EE databases. The problem is consistent with some change having been done either in Oracle or the Unix operating system. I don't have control over those systems and the administrator says nothing changed. Oracle has been stopped and started since the problem was noticed. The queue table was then dropped and recreated.
    Do you have any idea as to what could cause the difference? It looks like a difference between GMT and CDT time zones. It may be related to the session time zone, but when I set my session time zone to +00:00 to match the server, it becomes a one-hour difference instead of a five-hour difference.
    It is Oracle 10g 10.2.0.4.0.
    Thank you...

    Thanks for the reply.
    Yes, the five hour difference seems too coincidental. An offset in seconds is supplied to ENQUEUE, not a date, but I suppose AQ could calculate a due date based on the session timezone, but why? I'd think session time zone would be for display purposes. The fact that it's behavior changed without changes to the client environments (both JCBC java clients and PL/SQL clients on different machines) with identical PL/SQL code suggests AQ is responding to some kind of server parameter, either Oracle or Unix. I just don't know what.

  • HT4061 I keep getting a message and unable to utilize my iPad after returning from a flight, message states iCloud Backup - This iPad hasn't been backed up in 3 weeks. Backups happen when this iPad is plugged in, locked, and connected to Wi-Fi. Plugged in

    Greetings,
    Any help would be appreciated.
    I keep getting a message and unable to utilize my iPad after returning from a flight, message states iCloud Backup - This iPad hasn't been backed up in 3 weeks. Backups happen when this iPad is plugged in, locked, and connected to Wi-Fi. Plugged in but it is frozen, I keep pressing OK but nothing happens.
    Thank you

    Perform a Reset...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • Message Statement Limitation in ABAP

    We have a requirement in displaying a filename which is of more than 50 characters using message statement when the program is running in the back ground when the file name gets written in the job log the file name which is after 50 characters gets truncated we want to write the whole file name in the job log.
    We tried breaking the file name in to 2 different variables and then display it bu if we do so the whole file name gets displayed but with a space in the middle our requirement is to display the whole file name using message statement with out any space in between.
    Please help me if there is any way of it.
    Note: message statement has a limitation of 50 characters after that it gets truncated.

    DATA :     target(100) TYPE c,
                   local type i,
               target2(100) TYPE c.
    target = '/Private#Items/ABC_Reports/ABCD0011ZX_SWMO5XY2090329151005'
    DO.
      SEARCH target FOR '/'.
      IF sy-subrc EQ 0.
        local1 = sy-fdpos + 1.
        MOVE target+0(local1) TO file_path.
        CONCATENATE target2 file_path INTO target2.
        target = target+local1.
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    MESSAGE i047(z2) WITH 'FTP File Created:' target2 target.
    Message  class Z2 047 is defined as & & & &
    Note: this displays correctly in Fore ground the issue is when we run it in the back ground.
    This is  just a trial code which we have used  we are trying to Move the path in to one variable and file name in to other variabale and display as target alone has more than 50 characters and it cannot display 50 characters at once in a variable .

  • Itunes document manager pro will not open a document with .cwk extension. It will catch the document then error message states that it cannot open document. Can anyone tell me what Im doing wrong?

    Itunes document manager pro will not open a document with .cwk extension. It will catch the document then error message states that it cannot open document. Can anyone tell me what Im doing wrong?

    Forgive my ignorance but I have never hear of iTunes Document Manager Pro. If you mean Document Manager Pro, i was able to find that. Back to your problem, have you tried opening one of those files in the iOS iWorks apps? Form the quick read that I did about this, .cwk files can be opened by Pages, Numbers or Keynote, depending on what type of document that it is and those files can be read by Document Manager Pro, after properly saving them. I don't see that you can go directly from the .cwk file in Document Manager Pro without converting them first.
    I took a very quick look at the app, so I may be a missing something about its capability.

  • Getting error message -050 after downloading 11.1

    Getting error message -050 after downloading 11.1, radio and match do not work.

    What is the version of your OHS. Are you referring to 11gR2 webgate for OHS ?

  • Messages don't dequeue

    I manually queued row LCR's using the procedure described in chapter 16 in streams documentation pages 16-3 to 16-7. My messages are effectively queued but they are in WAITING state and i don't know why they are not dequeued automatically by the apply process.
    Any ideas ?
    Claudine

    Even I seem to have a similar problem.
    I am trying a sample OTN sample for OJMS/AQ.
    My MDB (which is a SIMPLE CMT MDB, with AUTO_ACKNOWLEDGE) is receving notifications. No issues here.
    But, All messages are REDELIVERED to my MDB instance (until the RETRY COUNT expires) .
    And the DATABASE TABLE, AQ$RPTESTQTAB, shows the MSG_STATE as 'READY', even fter the onMessage() returns.
    Why are MESSAGES not getting DEQUEUED from the QUEUE?
    This is the SIMPLEST of all EXAMPLES, with CMT MDB, and the CODE FOR CREATION , STARTING the QUEUE was from OTN.
    Please help urgently , as I need to justify my company's investment in JMS.

  • Agent going to ready state after login

    Hi guys,
    I have UCCX 5.0(2) and I would like to force agent to go to state ready after login. There were some posts on this topic and they suggested to play with workflow:
    1. add add action agent ready at startup - for this I get: "Error on Startup Event. Error Message: An Agent State Action may only be used on Answered and Dropped Events."
    2. add macro - record putting agent in ready state (keystroke Ctrl +W). This I can do, but agent gets error during login: " Could not execute Macro Action. Unable to playback to windows program."
    Did you have similar problems? Did you solve it and how? Or maybe you have some other idea how to force agent to go in ready state after login?
    BR,
    Jelena

    Hi,
    Problem An agent using Windows XP was able to start Agent Desktop, but was
    not able to enter an active state.
    Solution Windows XP can be configured so that the Internet Connection Firewall
    (ICF) is active. ICF acts by keeping track of all traffic to and from the
    computer; it will only allow information through that has originated from
    that particular computer. If a message originates from outside the
    computer, it will be discarded.
    To solve this problem, either turn off ICF (requires someone with
    administrator rights to the computer) or override the defaults to include
    known “good” connections like the CAD servers.
    And also, is it by any chance happening during a failover or failback scenario in a High Availability (HA) setup?
    If its a HA setup, did you install this CAD after the HA setup is made i.e. the CAD has the entries for the ip address of the both the nodes.
    Hope it helps,
    Anand

  • Call remains in "conferenced" state after the call is released

    We have a scenario where a lengthy recorded message is set up through a ICM call routing script.  If we call the number we assigned to the script using our hard phones the call is disconnected as soon as the recorded message is finished playing.
    When we use Cisco Administrator Desktop and the conference feature, the call remains in the "conferenced" state after the call has been released.
    My assumption was that our reports would be smarter than CAD and would get it right.  However, reporting agrees with CAD, it thinks the call remained on a conference call for the whole time.
    In the script we set some variables for the call, play the message through "RunExtScript" node, set a call type, than use the "ReleaseCall" node to disconnect the call. Any ideas how we can configure the script other than this?

    Hi,
    can you tell us more - do you have Translation Routing set up, perhaps?
    Also, can you take a look at the Router Log (on the Distributor server).
    And please swith the script to Monitoring mode to see where it fails.
    G.

  • BUG: Sandisk USB flash drive in "half-mounted" state after wake from sleep

    My Sandisk Cruzer Crossfire 4GB Flash Drive is left in a half-mounted state after wake from sleep. The Finder believes the drive is still mounted, the icon is on the Desktop. However opening a file on the drive, or trying to eject the drive, results in a long beach ball, followed by a message that I removed the drive without Ejecting it first. The same drive continues to work fine on my Tiger machine, and on PCs.
    Bug Report:
    Setup:
    Macbook 1st Gen (2.0 Ghz)
    Mac OS X Leopard 10.5 Clean Install
    Sandisk Cruzer Crossfire 4GB USB Flash Drive (in either port)
    Repro:
    Plug in the drive.
    Close the MacBook to put it to sleep
    Reopen the MacBook
    Result:
    The lights on the flash drive never light back up after wake from sleep. Navigating the drive, or trying to eject it results in a "you removed the device without ejecting it first" message.
    Expected:
    Drive should still be mounted and accessible after waking back up.

    It may be a design flaw in the device. Mac OS X does a lot more power management than most other OSes, including tearing devices down to little or no power during sleep. It is possible that the device simply misbehaves due to corrupted memory state or reports a substantially different GUID or something similarly bizarre upon wake. (Okay, that last one wouldn't technically be a power management issue....)
    If it doesn't have any problems except when sleeping the system, I would just make sure I unmounted it before putting the machine to sleep and wouldn't worry about it. Maybe check with Sandisk to see if they have a firmware updater for the device.

  • Can't connect to my itunes because the message states that another user is using my itunes when thi is not true.

    I can not connect to my itunes account because the message states that another user in using the account and this is not true.

    After a visit to the apple store, they were able to get through my pass code but unfortunately I found out that is was a problem with the logic board. Since Apple only wants to sell and not fix, I was able to locate an iphone repair near me that deals with logic boards and they are currently working on it right now. i should be getting it back soon. Im not sure if the problem you are experiencing is the same as i went through but it does sound like it may be also a hardware issue and would suggest searching online for an iphone repair place that can diagnose what exactly is wrong. Hope this helps.

  • Changing message state on queue

    Hi,
    I am just wondering if there is a way to change a message state from expired to ready while it is on the queue?
    I would prefer to find a direct way to do this rather than just dequeue the expired message and requeue it as a "new" message
    Edited by: 860757 on May 23, 2011 7:36 AM

    Hello,
    When you say to dequeue it from the exception queue and re-enqueue it onto the normal queue - this can be done in PL/sQL right?Yes you should be able to dequeue from the exception queue and re-enqueue onto the normal queue using the PL/SQL Api
    Is there a function to move everything from the exception queue to the normal queue?No.
    I assume the re-attempts value for each of the messages that is moved from the exception queue to the normal queue is reset to 0Correct.
    Thanks
    Peter

Maybe you are looking for