Concurrent requests dependency?

Posted on 2009-12-17
Last Modified: 2013-12-19

I have a scenario where concurrent request A is submitted and a while later B. Now the catch is that B should run only once A is complete. Is there any means by which this can be achieved?
At present, what happens is that B gets done before A and hence A ends up retrieving incorrect data from the database.

Question by:Bharath_Raj
    LVL 36

    Accepted Solution

    this is something which is in the design of the application
    so you need to specify how the application does the processing
    or post the code of handling the requests
    LVL 73

    Assisted Solution

    you can wrap A and B in a single process C where C calls A then B.

    If that isn't possible, you can use alerts, where A raises an alert  and B runs but waits for the alert.
    or use dbms_pipes to communicate between them
    or have A submit a dbms_job that invokes B , and then B will be queued but won't start until A commits
    or use sockets to communicate
    or use a dbms_job that polls the status of A by some means and when it detects A is done it starts B
    LVL 15

    Assisted Solution

    by:Franck Pachot
    You can also use enqueues: A and B both lock the same resource.
    That can be a row if it has a meaning , or you can use dbms_lock package.
    LVL 34

    Assisted Solution

    Is this a generic Oracle question involving a custom application, or is this an Oracle Applications (or EBS) issue involving Concurrent Manager programs?  In EBS, you should be able to define the two jobs so only one cof the two can be running at a time.
    LVL 73

    Expert Comment

    Please accept one or  more of the answers above that best helped you.
    LVL 73

    Expert Comment

    If no indication from author then I recommend split



    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.

    Suggested Solutions

    Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many‚Ķ
    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.
    Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
    This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

    737 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