How to find locked object query?

There is random error ORA-00054 coming during execution of one process which is using SELECT FOR UPDATE NO WAIT statement.
Logs of process is showing row is accessed only once but still it gets error of "resource busy".
So there must be any other session which is locking object and it is not identifid. I want to identify which other session/user is locking object.
I am trying with below query which shows session id, terminal name and object name which is locked.
SELECT a.sid,a.serial#, a.username,c.os_user_name,a.terminal,
b.object_id,substr(b.object_name,1,40) object_name,sysdate
from v$session a, dba_objects b, v$locked_object c
where a.sid = c.session_id
and b.object_id = c.object_id But i want information of SQL query from v$sqltext so i can find out throughout the applicaiton where it is executed?
Thanks

Finding session that it locking is not a problem.
Finding SQL responsible is not necessarily straightforward.
You might be lucky. You might not.
If the SQl responsible for locking the row ran for a long time or was blocked by something else, AND you're on version >= 10g AND you're licensed for Diagnostic Pack, then you should find some evidence in ASH - DBA_HIST_ACTIVE_SESS_HISTORY.
Doug Burns has a 10-part series on the subject.
http://oracledoug.com/serendipity/index.php?/archives/1477-Diagnosing-Locking-Problems-using-ASH-Part-1.html
There is another current thread on the same issue:
How to find sql statement which generates LOCK

Similar Messages

  • Triggers : How to find if my query is triggering any Update or not?

    hi all,
    how to find if the query I am running is triggering any Update trigger?
    Thanks,

    Hi,
    but if fine grained auditing is implemented in the DB, (DBMS_FGA) then creation of Update Trigger on SELECTs is a possibility. Which Version are you using??
    But how to check if any trigger is defined on all of the objects involved in the query?Using All_Triggers, User_Triggers.
    Regards.

  • How to find Info objects for particular filed??

    Hi
    I hav doubt Can anyone tel me???
    My Query s <b>How to find Info objects for particular filed??</b>
    For example i hav some table fileds, how to find Info objects for that fields??
    Pls explain me detaily
    Points wil be given for all answers.
    Thanks
    Senthil

    Hi Senthil ,
    You have your field description along with your Field right.
    For example:MATNR - Material Number
    Now take this description and go to your BW side Tcode:RSA1
    1)Search in Modelling >> Infoobjects >> Material Number
    Then you get few hits (matches)  which have description matched.
    For Example: 0material  - Material Number
    Check for the Length and type match.
    You will understand once you get those hits as to which is related to yours.
    2)Go to BI content and search in the infoobjects this has all active and inactive objects but this takes a little time (not much  though).
    3) You have meta data search / simple search also where you can search for the objects with field description as matching criteria.
    Hope your doubt is cleared atleast to some extent.
    Assign Points if helpful.
    Thanks,
    Priyanka

  • ADF: How to find out which query has taken what time?

    Hi,
    I have an ADF application which has many SQL queried running on each button click/page load, so how to find out which query is taking what amount of time? So that i can identify the long running queries and modify them to improve the application performance.
    Thanks in advance.

    Hi,
    As suggested by Timo,you need to start tracing on oracle.jbo package for getting the SQL queries.But I think the second option suggested by him would be better.You will have to override executeQueryForCollection method in VO Impl class .Pseudo code would be
    @Override
    Take start time
    super.executeQueryForCollection
    Take end time

  • How to find out the query is accessing the DB tables or not

    Hi Gurus ,
    How to find out the query is accessing the DB tables or not.
    Where exactly we will find this information in SAP BW.
    I know that this information we can find in ST03. But where exactly we will find the query information along with DB information?

    Lakshmi
    Activate BI Technical Content for Query analysis and run query against that.
    Hope this helps
    Thanks
    sat

  • How to use lock object? what we lock either total ztable or only record?

    Hi
    How to use lock object? what we lock either total ztable or only particular record?
    Don't tell create lock object on se11 with E letter & acll it in program with eENQUEUE & DEQUEUE.
    just tell me we will lock only particular record or total ztable?
    specify with example.
    Thanks.

    Hi
      Go to SE11, in the option 'Lock object' enter the name of your lock,
    begin with 'E', suppose 'EXXXX' And create. In tab 'Tables' fill the
    table name where the record you want to lock exist and select the
    lock mode. Lock mode can be shared and exclusive. If 'shared',
    when you lock the record, other can also read data, but can not
    modify. If 'exclusive', when you lock the record, other can neither
    read nor modify the record. After save and activate, you will get two
    function module.'ENQUEUE_EXXXX' to lock record,
    'DEQUEUE_EXXXX' to release lock on one record.
    When use this function module it only lock one record at a time. It
    does not lock the table.

  • How to find out sender query by using receiver query in RRI

    Hi,
    I have do some assignment settings .I know receiver query name ,but i don't know sender query name .
    please suggest me how to find out sender query name .
    is there any table /t-code ?
    Thanks,
    EDK.....

    Hello,
    If the receiver query is web report, then goto table RSBBSQUERY and in RONAM field put the web report name.
    You will get the sender query UID in the field ELTUID.
    Now take this UID and goto table RSRREPDIR and put this UID in COMPUID and you will get the query name.
    If the reciever query is bex query then get the UUID as above from RSRREPDIR by providin the tech name and then go to table RSBBSQUERY to get the UID of the sender query.
    Regards
    Shashank

  • How to handle lock object in BDC  call transcation method?

    Hi,
    how to handle lock object in BDC  call transcation method?
    Thanks In advances.

    If you are updating Z-fields then you need to create a lock entry, before you use call transaction.
    After creating lock object, please use FM Enqueue_<lockname> before CALL transaction and FM Dequeue_<lockname> after you have commited your data.
    Thanks,
    Kartavya

  • How to create lock object?

    How to create lock object,- by going to se11 i have created but when i am going to sm12 to see wheather the table is locked or not then it is showing no entries found.
    Please help me how to create Lock object and see wheather thetable is lock is locked or not.
    Thnks in advance

    Hi venkateshwar,
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    •     Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    •     Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    •     Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    https://forums.sdn.sap.com/click.jspa?searchID=115258&messageID=2656474
    Do the following steps..
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    <b>Reward points if this helps.
    Manish</b>

  • How to find last executed query on database and or schema.

    hi,
    how to find last executed query on database and or schema.
    yours sincerely

    Sessionwise if you wanna see means use v$session.. Because it will show execution time also so you can analyze it easily and get sql based on SID and serial number ..
    Try :
    select * from v$session;
    Regards..

  • How to find top utilized query for last two months in oem

    how to find top utilized query for last two months in oracle enterprise manager?

    Can you mark the thread as Helpful  and once marked the information can be reviewed by other customer for similar queries
    Regards
    Krishnan

  • How to find the objects created in last one year

    Hi Experts,
    How to find the objects created in last one year.
    Thanks in Advance,
    Iff

    hi
    just go through this table.
    <b>TADIR</b>  object as 'PROG'
    in this you can also provide the authors name in AUTHOR field
    and
    <b>TRDIRT</b>
    reward points if it helps,
    regards,

  • How to Find Business Objects for any Tranaction .

    Hi Abapers,
                        How to find Business objects for any transcation.....  and how to connect the Work flow to  any  Trancation  so that for example any body changes the date of Birth ...... so that the work flow should trigger .
    Thanks & Regards
    Bhaskar Rao.M

    Hi Bhaskar,
    For finding business object,you can try transaction SWO4 and by checking the documentation in it you can find your required business object.
    Another method is:
    1) Go to Trx SWE4 and switch on the event trace.
    2) Run your transaction which you want to use for triggering your workflow.
    3) Run transaction SWEL and find your Business Object and related event in it.
    For connnecting your WF to your transaction you have to create a start event in your WF in SWDD,where in you specify the Business Object and start event which you find using above method.
    Eg.You want your WF to be triggered whenever you have an error in your idoc.For this your BO will be IDOCAPPL and your event will be (inputErrorOccurred).This you will give in header data in SWDD.
    Neerja

  • Find lock object for field

    Hi Friends,
    I have one qurey. I would like to know the lock object for field MATNR.
    Any suggestion how I can find it out the lock object for specific field.
    Regards,
    Poonam

    hi,
    GOTO se11.
    select Lock object Radio button.
    Press F4.
    A popup appears, in that popup, under Short Description, type
    *Material* and press enter. you will get a list of lock objects, select your required.
    Always give the first letter in CAPS. like *Material*.

  • How to find unused objects in SAP BI system?

    Hello All,
    I have got a requirement- you can say optimization programme in BW system.
    For that i have to first find the list of unused obects-DSO's, IC, etc.
    We have RSDODSO, RSDCUBE tables, but not sure how to use them- by looking at latest data loads/ time stamp.
    If you have any suggestions on this .Please revert me back.
    Regards,
    Siva

    HI Kumar,
    For cubes: Goto se11 and use table RSMDATASTATE and check the value of the field LAST_CHANGE this is the date on which last time data is loaded in cube.
    Check RSMO & find which all data loads are happening daily...weekly...montly
    Refer to the link below for more info on unused objects:
    How to find UNUSED InfoObjects list in BEx Query by comparing with Infoprovider.
    How To Find Unused InfoObjects Part - 1.
    Regards,
    Ashvin

Maybe you are looking for

  • Inheretence is driving me crazy, help a n00bie out.

    I am driven insane by inheratance. In class we are using Blue J. The book we have does not have a good example. If anyone knows how inheretance is supposed to work and how to work multi inheretance with print statements please help me out. If I were

  • APEX_COLLECTION Ordered?

    Hi, Can anyone tell me how the APEX_COLLECTION is ordered or if it even is? I have a collection that is selecting the columns out of an updateable report and inserting them into a table. But it seems to be messing the ordering up as the incorrect val

  • Re: Ebuy Complaint - Not Shipping, October 2012 Or...

    Same problems here with ticket FYHLQY. Adapter was purchased on Oct 20, 2012. Credit card was charged immediately. First response from eBuynow was on Nov. 2 stating that they did not have the adapter in stock. After a long process of exchanging infor

  • Populating abstract structures in the wsdl

    Hi Experts, Need your help in dealing with an abstract wsdl structure. The scenario is a synchronous one and it is from CRM to legacy system via SAP-PO(7.4). Some structures are created by extending to an abstract element called "Action" and I'm able

  • VPN Issue when tethering using Bluetooth

    Hi all. I tether my laptop to my phone using USB, WiFi or Bluetooth as my primary internet connection (as I work remotely). My preference is to connect using Bluetooth (persistent connection, low power), however if I try to connect my laptop to the C