How to find who has locked a row in a table?

My DB is a Oracle Database 10g Enterprise Edition Release 10.2.0.4.0.
My question is very simple: You try to update a row of a table but find out it is locked by somebody else.
How do I find which user (or session) has locked that row?

SELECT Decode(request, 0, 'Holder: ',
                       'Waiter: ')
       ||vl.sid sess,
       status,
       id1,
       id2,
       lmode,
       request,
       vl.TYPE
FROM   v$lock vl,
       v$session vs
WHERE  ( id1, id2, vl.TYPE ) IN (SELECT id1,
                                        id2,
                                        TYPE
                                 FROM   v$lock
                                 WHERE  request > 0)
       AND vl.sid = vs.sid
ORDER  BY id1,
          request

Similar Messages

  • How to find who has created the condition records

    hi all,
    in POF1 condition records were created.for material and plant.how to find who has created condition records for the material and plant.
    is there any way to find who has created please help me out.
    thanks
    sunny

    Hi,
    There are two ways of finding the who has created the ondition record.
    01. This is through the sales order-> Item details level-> condtion Tab----> Select the condition type and click on dispaly condition record below in the same creen. Then  Goto tab on the menu and select the overview of the condition record. After do so you will have the details of diffrenr tabs. In this you need to select the Administrative data for the person who had created the condition record.
    02. Goto T. Code VK13 and give your condition type for which you need to find the person created the record. Select the header details tab for the person who had created the record.
    Hope this is fine with you.
    Bye & Enjoy SAP.
    Koganti

  • How to find who has created the determination records for packaging instruc

    how to find who has created the determination records for packaging instructions in POF1.
    need to find the user details from POF3.
    can any one plz suggets me.

    Sunny,
    Go to POF1 click on determined record -> Display -.> enter-> F8 then -> double click on the record for which you want to see the responsible person ->click on admin. data tab here u will find the responsible person. hope u got the right answer.
    Ravi Thapliyal
    IdhaSoft

  • How to find who has deleted program

    Hi,
    Some one has delete a report from the system.How can I find the user who has deleted?
    thanks

    Hi ,
    Please refer the threads,
    How to find who deleted my program?
    How to find deleted program
    Best Regards.
    Reward points if it is helpful.

  • How to find who has deleted the query in Production system

    I Experts,
    I have an issue. Someone has deleted one query in Production system.
    How can i find who has deleted the query??
    I searched the ans for the same i the below threads :-
    Query deleted in production
    How to find out who has deleted the production Query
    But it didn't help me as i couldn't understand how to use the transaction SLG1.. Can Someone please explain me how can i find out who has deleted the Query..
    Regards,
    Pavan Raj

    Hello,
    Please, remember the date on which date the query has seen last time  in the production server. You can use the last date in the From date and To date would be current  date and execute the SLG1 tcode. It would list you all the logs in the Object text you can search for BEX Query designer and sub object text column you can check for delete logs options.
    Double click on the object will list you the query and name. From the user column you can find who has deleted the query.
    Might be this can help you for analysis.
    Thanks
    Geeta Sharma

  • How to find who has changed SQL Server Agent 'Job History' settings.

    Hi all,
    I was searching from couple of days to know is there a way to find out who has changed the SQl agent property settings.
    Like if someone unchecks the SQL Agent History settings how i can find who has done that change?
    I searched for trace flags but there is nothing related to it, i searched for system tables and views of msdb but nothing which can give this information, even didn't find any audit setting that can monitor these activities.
    My sql version is SQL Server 2008. Please throw your ides on how to track the sql agent history setting changes!!!
    Thanks In Advance!!!!
    VVinayPrasad

    Hi,
    You might be able to AUDIT the execute on that SP but its not giving exactly what has been changed... i guess you are getting what i am looking for...
    whatever the property might be changed it only shows the sp name thats it.... but not the exact sql statement executed on background
    VVinayPrasad
    First of all: It's not about me, it's about you. And it's not a might, its a given fact. I
    tested it for you.
    Second: your question was:
    >>I was searching from couple of days to know is there a way to find out
    who has changed the SQl agent property settings.
    >>Like if someone unchecks the SQL Agent History settings how i can find who has done that change?
    So please first clear up, what you really need.
    Third: instead of Auditing I already gave the advise to use Tracing (be it SQLTrace or Extended Events). Both will give you the exact statement. SQLTrace may be easier on SQL2008
    Please try all of the provided first before doing guesswork.
    Andreas Wolter (Blog |
    Twitter)
    MCM - Microsoft Certified Master SQL Server 2008
    MCSM - Microsoft Certified Solutions Master Data Platform, SQL Server 2012
    www.andreas-wolter.com |
    www.SarpedonQualityLab.com

  • Information on who has updated a row in a table

    i need to check who has updated a row in my schema,
    including its username,
    time log on
    and ip address - most important
    is it possible for me to track ? in oracle ?

    You need to turn on auditing to log such information.
    Logminer is another option, however you won't have all needed information unless you have turned on SUPPLEMENTAL Logging.
    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

  • How to find who has deleted the objects in 10g

    All,
    On 10th feb i have created a sequence (M_KEY_SEQ) as per my user request.
    But i could not find the sequence in the database now, Could any one please tell me
    how to find out ..who has dropped the sequence, (looks like some drop actions has been carried out from my user side, we suspect those drop jobs might dropped this sequence but we dont have correct information about who has dropped it..so we cant tell them that you have dropped).
    Any suggestions please...
    No auditing enabled in our database.

    If you dont mind ..could you please explain me how to use DBMS_LOGMINER to find out the deleted sequences

  • How to find who has deleted pograms .

    Hi experts.
    Suppose U have created  a program and after certain time you found that, the program is deleted by some one and now it does not exits.
    In this case, how can one found that who has deleted the program by using the program name.
    I mean there must be a table which keeps the record of all deleted objects or there must be a transaction from which we can know this.
    Waiting for reply.

    Hi all .
    The serveron which I work, I think versio history is not maintained or I might have not created any version.
    And the table VRSD keep the record of changes only and of the deleted entires.
    please let me know some other solutions

  • How to find who has posted the invoice MIRO

    Hi All
    Is there any way to find out who has posted the MIRO invoice .
    Regards
    NTT

    Hi,
    Open MIRO document and then click on option-follow-on documents. it will directed to accounting number then , in the account details ,Click on Goto > Document Header (F5) ,it will give you the name of person who have created MIRO
    Or if you want to find out user names against multiple MIRO's then open FB03 ,click on document List and document type as "RE"  ,give required inputs and then EXECUTE ,system will give you the name of person who have created MIRO in system along with time of entry.
    Hope this will help you lot.
    Regards,
    Sandesh Sawant

  • How to find the difference between 2 rows in a table

    Hi all
    I have a table say emp which has only 2 rows
    emp
    empno name age sex deptno
    1 X 20 M 10
    2 Y 21 M 20
    The output should be
    empno name age deptno
    1 X 20 10
    2 Y 21 20
    Since the sex are same , so it is not included in the output.
    thanks
    Hari

    Hi there rajkumar,
    Although your lead solution is more elegant than the one presented below,
    I believe the complete answer it would be:
    with mytable as (
    SELECT ROW_NUMBER() OVER (ORDER BY EMPNO) POS, Z.* FROM (
    select 1 empno, 'X' name, 20 age, 'M' sex, 10 deptno from dual
    union
    select 2, 'Y', 21, 'M', 20 from dual) Z
    SELECT
    DECODE(A.EMPNO,B.EMPNO,NULL,A.EMPNO) EMPNO,
    DECODE(A.NAME,B.NAME,NULL,A.NAME) NAME,
    DECODE(A.AGE,B.AGE,NULL,A.AGE) AGE,
    DECODE(A.SEX,B.SEX,NULL,A.SEX) SEX,
    DECODE(A.DEPTNO,B.DEPTNO,NULL,A.DEPTNO) DEPTNO
    FROM
    (SELECT * FROM mytable WHERE POS = 1) A,
    (SELECT * FROM mytable WHERE POS = 2) B
    UNION
    SELECT
    DECODE(B.EMPNO,A.EMPNO,NULL,B.EMPNO) EMPNO,
    DECODE(B.NAME,A.NAME,NULL,B.NAME) NAME,
    DECODE(B.AGE,A.AGE,NULL,B.AGE) AGE,
    DECODE(B.SEX,A.SEX,NULL,B.SEX) SEX,
    DECODE(B.DEPTNO,A.DEPTNO,NULL,B.DEPTNO) DEPTNO
    FROM
    (SELECT * FROM mytable WHERE POS = 1) A,
    (SELECT * FROM mytable WHERE POS = 2) B
    Your query indeed returns NULL in the column for which values are the same, but still, you get just the first row.
    Anyway, the question is how to dinamically select the columns that hold NULL values, in the newly generated result. Because i believe the request is like this, if column holds equal values on both rows, then don't select the column (maybe i'm wrong).
    If this is the case then just by one sql it will not solve your problem, it needs to be more, with sqlplus and some other scripts checking the values in the columns, if it's not null then set an operator, and in the end (in sqlplus)
    select operator1, operator2 etc. from mytable.
    Hope it helps,
    Michael.
    [All the above presented is based on the fact that you shall always have TWO rows to be compared, having more or less it will fail!]
    Message was edited by:
    kjt

  • Finding who has dropped th epartitions

    Hi,
    Can some body help me on how to find who has dropped the partitions in a table in oracle 10.2
    Thanks
    Lbn

    Partitions can only be dropped by a schema and code that have permissions to drop those objects. So given the security model you have on that database, nothing incorrect was done.
    If this happens not to be the case, and partitions were dropped "illegally", then the security model used is flawed.
    And the first action should be identifying the flaws in the security model and fixing these - properly. A witch hunt for an offender will not fix or resolve anything.
    As for finding the "offender" - unless you have auditing enabled, or archive logs to mine, there is no way to identify the "offender".
    Rather fix your security model first. That is what the problem is. Not the fact that an "offender" (accidentally) manage to wipe partitions.

  • Find user who has locked

    Hi All,
    Some times when we are using the SAP system it show that a particular object has been locked .
    My question is , Is there any way to find that who has locked the data i.e. can we get the computer name or some other info from which the user can be tracked .
    Regards,
    Aditya.

    Hi Aditya,
    If your are looking for terminal name (Computer Name), Transaction name, SAP User Id and the time, then maybe transaction SM04 is the one which will suit you.
    If you double click on the row and say " End Session ", the user will be thrown out of that transaction.
    Reward points if helpful.
    Regards
    Ravi

  • How to check who has cancel jobs in SM37

    Hello every one.
    Can any one explain how to check  who has cancel jobs in SM37(job overview).
    Is it possible to know such logs.
    In sm37 its only gives details about jobs what ever.
    Thanks & Regards.

    hi.
         Use SM 36 for creating the job...and SM 37 for displayin the job...here
    u can see some details such as job name,job modifier name,modified date from which date to which date....but u must know the job name den only u can find the modifier name there...
    it is possible to know such logs.....
          select the job..in that screen job log button is there..select the button,can get the job log ..ie start time and end time and some  other informations..
    hope this helps u..
    assign sum points if applicable...
    regards,
    ramanan

  • How to check who has approved the PO or PR?

    Hi,
    Can someone tell, how to check who has approved the PO or PR?
    Regards.

    Go to PO display ME23N go to enviornment data and see for header changes here you can see the person who has release the PO at what dat with time, user id and T-code used for release.
    Else if version management is activated in your client then check at the version tab at the header level of PO here also you will find the required details.
    For PR you can check the item details.
    Regards
    Sujoy
    Edited by: Sujoy on Apr 9, 2009 1:18 PM

Maybe you are looking for

  • Branch Office  - Not syncing with Mobile server

    Hi All, I have a strange problem with brach office installation , After downloading brachoffice set up on to my system from mobile server and completing set up .. I can see any tables . . is there any other steps I have to follow?

  • What is the model number of the unlocked iPhone 5s sold in hong kong?

    Under apple's tech spec section they show 4 model numbers for Hong Kong but don't indicate which one is the unlocked version - the way they show data is very confusing - even if you put the phone in your shopping cart it shows a different "part numbe

  • Bursting with multiple attachments?

    hi all, we have created a custom PO report. the report produces an xml data grouped by a vendor then by their POs. we want to use bursting but need to create separate report outputs per PO then will attach all POs to an email then send it to its corr

  • How to the *material costing* after below steps

    Hi sapgurus please help us, How to the material costing after below steps 1.     Actual costing /material ledger 2.     Material update 3.     Actual costing 4.     Production start up 5.     Customizing setting in OBYC please sent to any documents.

  • Indesign glossary with descriptions

    Dear Indesign Pro's. I have been using Indesign to make my graduation research report. There are many words which could use a additional description in the form of a Glossary at the end of the report. How can I create suchs a page. I have a index so