How to find who holds a SQL lock when its not v$ session.sql_id and v$ session.prev_sql_id

Hi all

Looking a little nudge in the right direction on a strange problem with blocking locks in our database of BSE...

We occasionally will blocking locks in our EBS 12.1.3 database (11.2.0.4 CARS on OEL5).   I can easily determine the INST_ID select and SID that keeps the lock with this:

Select final_blocking_instance, final_blocking_session from gv$ session where lockwait is not null;

and can use these results to find the specific object being blocked by querying a gv$ locked_object where session_id = xxx and INST_ID select = xxx.   These sessions blocker are generally inactive to an event of "SQL * Net client message"-while they seem to be connected to the database users who need simply to commit or rollback transactions.   Usually, when I see this type of behavior, the specific application involved in the unresolved external transactions is easy to find by taking the SQL_ID (or sometimes the PREV_SQL_ID) value of gv$ session and questioning gv$ sql.  I can then use this information to better understand what users are trying to accomplish and help them understand what they need to change to avoid the deadlock problem.

But recently, we have integrated the add-on of Oracle content management and it seems to have added (I suspect indirectly) triggers for many forms EBS our users work in.  Now that we know these "locks blocking inactive form" - and the SQL_ID value is zero and related PREV_SQL_ID sql_text is

SELECT * FROM AXF_COMMANDS_SYN WHERE FORMID =: b1 AND (MENUTYPE = 'SPÉCIAL' MENUTYPE or = "ZOOMANDSPECIAL") AND AXF_COMMANDS_SYN. SPECIAL 'n' IS NOT NULL


Although I can see SGS $ locked_object both the text of the SQL being run by sessions which blocked the blocking the locks held by the session is on an object (for example RA_CUSTOMER_TRX_ALL) that does not seem to be at all related to AXF_COMMANDS_SYN.   The AXF schema has been added as part of the deployment of content management.


So, my thought is that a different cursor open (previous) held by the session is the real unresolved SQL that maintains the lock.  Is there a way to determine the SQL_ID of this query "indirectly" from gv$ locked_object / gv$ transaction, gv$ open_cursor, etc.?  I can determine what is the problem and what user, we need to talk to him - but I would really like to find the exact SQL that is involved.   I am also to establish if the new behavior is somehow contributing to locking problems blocking or just 'a Kipper"- and I think I know which statement SQL Gets the lock will help me to move forward with the investigation.  I'm sure I could find this info by tracing the blocking - session but the problem occurs rarely, and I'm not able to determine which trace session until it is too late... :-)


Any recommendations would be appreciated, and my apologies for the long post...









A session may issue a followed LMD of 5 requests without issuing a commit.

Another session may be attempting a DML when the 5th request session above is running.  Querying V$ session for the first session SQL_ID or PREV_SQL_ID wouldn't you say the first SQL DML.

You can walk backwards through V$ ACTIVE_SESSION_HISTORY (if you have the License Pack diagnosis) and determine all SQL_IDs of this first session if they did get captured in V$ ACTIVE_SESSION_HISTORY or DBA_HIST_ACTIVE_SESS_HISTORY.  (Attention: not all SQLs are captured - particularly short-lived SQLs can't get captured)

Hemant K Collette

Tags: Database

Similar Questions

  • How to find who changed his mind?

    Can we know how to find "* who changed a view given in the database? ' * ' as username, computer name, or same OS user name nay thing at least one of them, if not all.

    When I checekd with
    SELECT last_ddl_time FROM object where object_name =: object_name,.
    I found his altered 5 days back.

    Any help would be appreciated.

    Thank you.

    Hi again: P.

    The only way to do this is you has BEEN verified this point of view.

    You can do this for next time by using the following procedure.

    http://www.Oracle-base.com/articles/10G/Auditing_10gR2.php

    Kind regards

    Mario Alcaide
    http://marioalcaide.WordPress.com

  • How can I find out if firefox is locked when I'm on a view of the Bank?

    When I get on an Internet site of the Bank to pay the Bills, how can I find out if firefox is locked if nobody sees what I'm doing?

    Looking for the blue color of the key of the identity of the Site. In addition, you can view the information on this web site by clicking on the Site identity button, the lock appears here.

    https://support.Mozilla.com/en-us/KB/site+identity+button

  • How to find instructions to duplicate SQL using OEM 12 c

    Anyone know how to find the SQL statements in dual-use OEM 12 c cloud control?

    I found this:

    target database open--> performance--> go down with the page (duplicate SQL)

  • LR5.7 - I need to find some missing photos. I have photo identification numbers, but do not know how to find them in all catalogs various - LR does not seem to offer this option.

    Any ideas on how I find missing pictures in LR5.7?  I have their identification numbers, but there seems to be nowhere to type them in and say "search".

    You can open that one catalog at a time.

    Your question is one of the reason why most of us work with a single catalog only.

  • How to find the number of bind variables declared in the current session

    Hi all
    I want to know a query to find out the number of variables declared in the current session.

    Note that the name of this forum is "SQL Developer *(Not for general SQL/PLSQL questions) * ', as well as for the issues with the SQL Developer tool. Please post these questions under the dedicated [SQL and PL/SQL | https://forums.oracle.com/forums/forum.jspa?forumID=75] forum (you have posted here before).

    Kind regards
    K.

  • How to find who attended and not

    Hello world
    Can I get help with this:
    I have a main table that contain emp_id,
    and I table of attendance.

    SQL > desc attendance
    emp_id
    attend_date
    entry_time
    exit_time

    I want to create the query to obtain the appearance of sysdate to sysdate-7, I would like to get information about attending and who did not attend.

    for example:
    emp_id, attend_date, entry_time, exit_time, status
    ----------------------------------------------------------
    A001, 02/01/2013, 07:00, 16:00, this
    A002, 02/01/2013, 08:00, 16:00, this
    A001, 02/02/2013, 07:00, 16:00, this
    A002, 02/02/2013, 07:00, 16:00, absent
    A001, 02/03/2013, 07:00, 16:00, this
    A002, 02/03/2013, 07:00, 16:00, this
    A001, 02/04/2013, 07:00, 16:00, this
    A002, 02/04/2013, 07:00, 16:00, this
    A001, 02/05/2013, 07:00, 16:00, absent
    A002, 02/05/2013, 07:00, 16:00, this
    A001, 02/06/2013, 07:00, 16:00, this
    A002, 02/06/2013, 07:00, 16:00, this
    A001, 02/07/2013, 07:00, 16:00, this
    A002, 02/07/2013, 07:00, 16:00, this

    Note: the table of attendance does not record if the employee did not attend, that's why I want to get that out.


    Kind regards
    -- assuming its run for 7 days from '03/01/2013', this can be suitably parametrized
    
    with date_range as (
     select (to_date('01/03/2013','dd/mm/yyyy')-1) + level dt from dual
     connect by level <= 7)
    select dre.emp_id,
           dre.dt,
           att.attend_date,
           case when att.attend_date is not null then 'ATTEND'
                else 'NOT ATTEND'
           end status
    from attendance att,
         (select dr.dt, mst.emp_id from date_range dr, mst) dre
    where dre.dt = att.attend_date(+)
      and dre.emp_id = att.emp_id(+)
    order by dre.dt, dre.emp_id
    
        EMP_ID     DT                 ATTEND_DATE        STATUS
    ---------- ------------------ ------------------ ----------
           100 01/03/2013,12:00am 01/03/2013,12:00am ATTEND
           101 01/03/2013,12:00am 01/03/2013,12:00am ATTEND
           100 02/03/2013,12:00am 02/03/2013,12:00am ATTEND
           101 02/03/2013,12:00am                    NOT ATTEND
           100 03/03/2013,12:00am                    NOT ATTEND
           101 03/03/2013,12:00am 03/03/2013,12:00am ATTEND
           100 04/03/2013,12:00am 04/03/2013,12:00am ATTEND
           101 04/03/2013,12:00am 04/03/2013,12:00am ATTEND
           100 05/03/2013,12:00am 05/03/2013,12:00am ATTEND
           101 05/03/2013,12:00am 05/03/2013,12:00am ATTEND
           100 06/03/2013,12:00am 06/03/2013,12:00am ATTEND
    
        EMP_ID DT                 ATTEND_DATE        STATUS
    ---------- ------------------ ------------------ ----------
           101 06/03/2013,12:00am 06/03/2013,12:00am ATTEND
           100 07/03/2013,12:00am 07/03/2013,12:00am ATTEND
           101 07/03/2013,12:00am                    NOT ATTEND
    
    14 rows selected.
    
  • How to find who send emails to everyone in my address of my computer books

    My address books are with bigpond, hotmail and yahoo. Emails are sent to all recipients of my computer.

    You must scan your system against viruses and malware.  Get www.microsoft.com/security_essentials and also get www.malwarebytes.org for malware.  In addition, in OE, go to tools | Options | Security and check the box that says to warn you if an application sends emails.

    Steve

  • How to find the data document read/show rank or not by the user?

    iewI have IR report when the user logged on to the application and read the line (possibly, click on the view (edit) and read information in the form page) then a column called READING is YES, otherwise this line should be NO LU! How can I achieve this?

    Document User Read state?
    Task 1ARead
    Task 2ANo reading

    Just because someone clicked on a link does not mean that the end-user it read.  Personally, I would ask the end-user if they read and which record.

    For the SQL... Use instead of DECODE CASE.

    ... or vice versa the DECODING logic

    decode ((select...), 0, 'Unread', 'Read') as REad_status

    MK

  • How to find the MAC address for photosmart c510 - printer, not zineb

    HP Photosmart c510 all-in-One

    Windows 7 SP1

    Printer bought 2 weeks ago.

    Printer wireless light is not on, not even flashing

    I use MAC address filtering on my home wireless router.  No problem adding the Zeen, I found that it is easy MAC.  Of course for the printer, it says "Printer not available" on the display of zineb, just below the zitoun MAC address.

    So I need to add the MAC address of the printer to my router.  I know that I can turn off filtering by MAC address and I hope that the printer connects, and then I can print the printer network settings, get the MAC, and then again turn on the filter and add the printer Mac

    Is this the ONLY way I can get the MAC address of the printer?  I'd rather not have to do that whole process, but will if I have to.

    I also wonder why the printer wireless light is not even blinking as he is looking for a network.

    Can anyone help?

    Print a network Test Wireless in the network menu on the front of the printer. It will contain the MAC address. Note that MAC filtering is not in that ensure that used MAC addresses are sent in the clear, and it is easy to impersonate a MAC address on a computer.

  • How to find the dynamically related files where Wordpress is not involved

    There are a lot of posts on "dynamically related files can be solved because the site definition is not correct for this server", but they all seem to relate to Wordpress or other blogging software.

    I recently had to upgrade DW8 to CS5.5 DW running on Windows 7 64 bit. and get this error on many pages, but there is no help in fixing it.  The local testing server is localhost, set up to run PHP with iis7 on virtual folders.

    What should I do to get the found dynamically related files?

    Thank you

    I think I've cracked it - nothing to do with the databases, which was a red

    herring.

    I had a hundred sites on a XP machine running Dreamweaver 8 and used

    the ease of export to save their settings when I moved to a Windows 7

    System.  The structure of directories of Win7 is different, but the testing server

    location stored in the export file does not take account of that and a part of

    the path can now include directories that are perceived as shortcuts.  Once the

    locations are reset to zero in terms of Win7, the errors go away.

    Concerning

    Steve

    Steve and Diana Kimpton

    The Word pool

    http://www.wordpooldesign.co.UK/

    http://www.wordpool.co.UK/

    http://www.ukchildrensbooks.co.UK/

    http://www.contactanauthor.co.UK http://www.contactanauthor.co.UK/

  • How can I erase images in the Clipboard when using applications of ink sketches and slide or lines?

    I had trouble with my Clipboard by using my ink from adobe. Y at - it anyway I can't erase the pictures stored in the Clipboard, as were trying and I can't find a way to do it, it seems that the only option is to turn the selection to your Favorites and then appears an icon to the trash can, but even if I chose to delete it only fade Favorites Clipboard in the Clipboard.

    I thought to delete the sketches App, or the deletion of the draft but I don't want to risk losing my job.

    Thank you!

    I asked a similar question in the forum to draw lots and got this response:

    Re: How to clear the Clipboard and empty drawings?

    In short: you can not erase these clippings, at least not now.

  • How to uninstall Windows XP Security Center 2011 when I can't download anything and that my office is black caused by the virus?

    Windows XP Security 2011 Center has taken over my computer so I can't access all the programs and the desktop is black. How can I get rid of this? I can open in safe mode, but have had no chance of this and the solutions of regedit, I saw posted on the internet do not match the entries that I have.

    Hi Rob Rok.

    You'll need to start in safe mode with network and later download and run the Microsoft Safety Scanner to remove the infections by the virus of the computer.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

     

    You can also use Microsoft Security databases to scan your computer

    http://www.Microsoft.com/security/PC-security/MSE.aspx

  • How can I remove the start icon? I do not have a password and want to start to be with my office.

    When I start the computer, I don't want the screen asking password.  I want to go directly to my desktop at startup.  How do I configure this?

    Looks like it worked correctly that the curriculum vitae of sleep is a different setting.

    1 set the screen saver - Panel, customize, Screensaver [in the lower right corner of the window]. You can change the time and whether or not sign it again after it also activates.

    You should then check the logon not in both setting

    2 power options, [on the left side of the window] requires a password on wakeup - disable if you do not want to have to reconnect after sleep.

    3 power options, plan {power} active settings change, change of plan avancΘs, [you will have to click on "view the currently hidden settings] {active power plan}, require a password on wake up - turn off the

  • How to get my account hotmail reset reset when I lost my key recovery and factor two app

    I have a Hotmail.com account. I forgot my password and reset it. He then asked if I wanted to sign to two factors. I said yes. In the meantime, I lost the recovery key and the phone that had the soft recovery went even if a master reboot. So I made the process "cannot access my account", but when I entered the code my alternative email which was not enough security. I got to a point where he says he would allow me to reset my password after 30 days. He has sent me anything on the 30th day. So I tried again today and he appointed me another 30 days. I can't wait that long. My windows phone can download applications and I can't to my Office 365 account where I purchased a monthly subscription at the office. I can't find any number to call. Help, please.

    Larry Steuer

    Hello Larry,.

    Thanks for posting your question on the Microsoft community.

    Thank you for details on the issue.

    It is regrettable that you have problems with your Microsoft account.

    I suggest you to refer to this article and check if it helps.
    Reference:
    Account Microsoft FAQ
    https://support.Xbox.com/en-us/my-account/Microsoft-account/manage-your-Microsoft-account-FAQ

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

Maybe you are looking for

  • Compatible drive for Satellite L30-134 (PSL33E-00E00WRU)

    Please indicate internal what HARD drive I should buy for my laptop Satellite L30-134 (PSL33E-00E00WRU)?

  • Supported Bluetooth Service does not start

    The service above will not start. When an attempt is made to run, it says that the service did not timely. I tried put it back, with no joy. Windows XP SP3, which seems to be the culprit EDIT: The user is using a Bluetooth Dongle. It works fine on ot

  • file vcwecg extensions

    Don't know how, but in the last week THAT ALL my scanned PDF files modified extension of .pdf to . PDF.vcweacg someone has seen this?  I just want to check whether or not this is linked to a virus.   These files are editable in their PDF without read

  • Is there a log file for the copy of the errors

    Often, when I copy a lot of files, there are a few errors... which usually appears at the end of the copy function.  These errors appear in a dialog box that is too small to read the path/file names.  And I need not only to take a decision to continu

  • How can I set a default page point?

    Hello world.I am facing a problem by setting the default value to a page element in the apex 4.2.I want the default value to a page (P3_EMP_NAME) element using the PL/SQL function body.When I use the following code, I have faced no problem:The defaul