ORA-00054 - Find user who have lock

Hi,
I'm using "select for update NOWAIT" in my application for editing records. It works but after I catch ORA-00054 I want to find username who have the lock.
The basic step is propably to query view v$lock and propably after then some else view.
Thanks for any idea/solution
SASA

You'll need to scroll down a while to get to your particular question in the thread I linked... I believe it's about a third of the way down.
It is not possible to know who is locking a particular row unless there are two sessions that are blocking each other. If session 1 has a lock on a particular row and session 2 requests a lock on that same row and session 2 is waiting for that lock to free up, session 3 can query the v$lock table to see which session holds the lock and which session is waiting for the lock. Assuming everyone is logging in with their own user name, you can join this information with v$session to find out the username of the person holding the lock. In your case, though, no session is ever blocked, so you cannot determine who owns the lock.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • 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

  • Find users who have SYSADMIN responsibility

    I want find all the users that has SYSADMIN responsibility.
    any clues?

    I want find all the users that has SYSADMIN responsibility.
    any clues?From the application: Submit "Users of a Responsibility" concurrent program
    From the database:
    SQL> SELECT fu.*
    FROM fnd_user_resp_groups_direct furgd, fnd_responsibility_vl frvl, fnd_user fu
    WHERE furgd.responsibility_id = frvl.responsibility_id
    AND fu.user_id = furgd.user_id
    AND(to_char(furgd.end_date) is null
    OR furgd.end_date > sysdate)
    AND frvl.end_date is null
    AND frvl.responsibility_name = 'System Administrator'; Also, see the queries in old threads -- http://forums.oracle.com/forums/search.jspa?threadID=&q=Query+AND+Users+AND+Responsibilities&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • How to find out users who have answered security questions

    Is there any report where we can find out users who have answered security questions.
    Please reply back to this.

    This might help you:
    Define a task template, reference the UserQuestionReport task definition:
      <TaskDefinitionRef>
        <ObjectRef type='TaskDefinition' id='#ID#TaskDefinition:UserQuestionReport' name='User Question Report' displayName='UI_REPTS_XML_USER_QUESTION_TITLE'/>
      </TaskDefinitionRef>Define desired variables
          <Attribute name='attrListField'>
            <List>
              <String>accountId</String>
              <String>policy</String>
              <String>loginInterface</String>
              <String>questions</String>
            </List>
          </Attribute>
          <Attribute name='attrMapField'>
            <Map>
              <MapEntry key='accountId' value='UI_REPTS_XML_REPORT_ATTR_ACCOUNTID'/>
              <MapEntry key='loginInterface' value='UI_ATTR_LOGIN_INTERFACE'/>
              <MapEntry key='policy' value='UI_SERVICEMODIFY_JSP_ACCOUNTPOLICY'/>
              <MapEntry key='questions' value='UI_ATTR_MIN_QUESTION_UNANSWERED'/>
            </Map>
          </Attribute>and the rest of the task template for a report definition.
    Hth
    Edited by: nickoarg on Feb 5, 2009 1:57 PM

  • Query to find out the list of user who have delete access

    Hi,
    I need a query to find out the list of users who have delete access on perticular folder/universe/ reports  in infoview.
    Please advice.
    Regards,
    Neo.

    orton607 wrote:
    thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
    thanks,
    ortonThis is not possible. The best you could do is to have a good guess.
    Or how would you parse some dynamic statement as this:
       v_suffix := 'loyees';
       v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
       execute_immediate(v_sql);
    ...What is the table name? How do you want to parse that?
    Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts.

  • Need a way to find out users who have not all logged in into the portal

    Hi all,
    Please can some body tell me the way to find out all the users who have not at all logged in into the SAP enterprise portal after their user ID's are created.
    Are there any methods(UME APIs) or attributes that set the status of user whether he/she has logged in into the portal first time.
    Thanks & Regards,
    Hajira Rehman

    There used to be a way, but here's what Detlev posted earlier this year:
    <b>Hi everyone,
    UPDATE on this: From SP16 on, the last successful login date does not get logged into the database anymore, see <a href="http://help.sap.com/saphelp_nw04/helpdata/en/43/bc6b9202454dece10000000a422035/frameset.htm">here</a> - for performance reasons, as it is stated...
    Hope it helps not to fall into this new trap
    Detlev</b>
    So, there are no simple APIs - you'll need to build your own mechanism.

  • List of users who have authorization for a particular transaction?

    Hi All,
    Can anyone guide me how to know the list of users who have authorization for a particular transaction?
    I need this to find out the list of authorizations that are obsolete ,when the particular trnsaction is obsolete in an Upgrade process.
    Thanks in advance.

    we can get the list of users for a particular transaction as below.
    get the tcode and place in AGR_TCODES and we get the list of roles .
    loop the roles and pass each role to AGR_USERS and we get list of users for that role.
    finally we got the list of users for that tcode.

  • List of users who have access to a specific universe

    Hello Experts,
    We have a requirement to get the list of the users who have access to a specific universe. Please suggest how to achieve this ?
    Is there any query to find this list by query builder or query to audit database ?
    We are using Business objects 3.1 sp5.
    Many Thanks
    Ankur

    Ankur,
    Refer to the discussion below:
    how to get a list of reports a user has access to, using either the cms database or the auditing database
    Regards,
    Ashvin

  • How to find user who loaded the procs in DB

    Hi guys how to find user who loaded procs in database ..and the date...
    is there anyway..
    i tried to look at all_objects..but it didnot workout..
    thanks

    That is correct. You will only have audit rows for item that you are auditing. I am suggesting you audit all DDL in a production database since production jobs should not perform DDL with the probable exception of truncate. This will provide this type of information going forward. It will not help you answer the question of who created the procedure last week?
    Auditing is explained in the Security manual and the full comand syntax is available in the SQL manual.
    You can easily write a purge the audit data to remove data once it is no longer of interest based on the date the audit row was created.
    HTH -- Mark D Powell --

  • How to find out who is locking my database account ?

    Hi,
    Which dynamic view can help me to find out who is locking my database account ?
    Thanks

    Yoav wrote:
    Hi,
    Which dynamic view can help me to find out who is locking my database account ?
    Thanksdoes account have PROFILE?
    if so, repeated failed logons can result in locked account.
    enable AUDIT to see from where logins originate.

  • How to find users who are inactive.

    Hi I want to find users who left the company. I ran program rsusr200 in se38 but not understanding which option will clearly give me the invalid users. Also i had a doubt. Does users with password deactivated that the user left the company.
    Thanks in Advance for your help

    The "password" field in this report will not necessarily show you users who have left the company. The password may be be "active" since this is a new user and they have not yet logged on. You would need to compare as well the field "Created On". I would use the last logon field as an indicator of who may have left - if someone has not logged on in 90 days, that could be an indicator.

  • How can I list all users who have access to a particular TABLE or VIEW

    Hi,
    Can someone tell me how I can list all users who have access to a particular TABLE or VIEW.
    Abhishek

    Hi,
    Take a look on this link: http://www.petefinnigan.com/tools.htm
    Cheers

  • Can I get a list of users who have a specific authorization role?

    Hello,
    I'm wondering if there is a BAPI or FM that takes as input a single authorization role and gives me back a list of all users who have that role?
    Thx.
    Andy Jacobs

    hi,
    please check the below FM
    'PRGN_1001_READ_USER_ASSIGNMENT'
    jaffer ,
    Please reward the helpful answers.

  • Query to find customers who have not purchased anything

    I have a query to find customers who have purchased what we call consumables (using item property) over a given period:
    SELECT T0.CardCode, T0.CardName, T0.DocDate, T0.DocTotal, T1.ItemCode, T1.Dscription,T1.quantity, T2.ItmsGrpNam
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry, OITG T2
    WHERE T0.DocDate BETWEEN '[%0]' AND '[%1]' AND T1.ItemCode like '2ssy%' AND  T2.ItmsGrpNam = 'consumable'
    I have another to show customers who have a particular type of equipment:
    SELECT T0.manufSN,T0.itemName,  T3.Name, T2.Address, T2.Street, T2.Block, T2.City, T2.County, T2.ZipCode
    FROM OINS T0 INNER JOIN OCRD T1 ON T0.customer = T1.CardCode INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode Inner Join OCPR T3 ON T0.ContactCod = T3.CntctCode
    WHERE T0.manufSN like 'P%' AND T2.AdresType= 'S'
    What I would like is to find those customers who have this equipment (query 2) but who have NOT purchased and consumables in say the last year.
    I have tried using Excel by finding duplicates and taking those in query 1 from those in query 2 but it's very messy.
    Has anyone done anything like this or got any good ideas?
    Thanks

    Hi Ralph,
    Well, I enjoy teaching, so let's start at the beginning.  SQL is a fairly full-featured language, and it supports recursion and nesting.  That's why the books online often describe elements of the SQL statements as "expression" - it may be more than a field or a simple function occurring there.  Nesting is the little puppy we used here.
    Now, in your first post, you said:  "What I would like is to find those customers who have this equipment (query 2) but who have NOT purchased and consumables (query 1) in say the last year."
    So, our common point between the two queries is the customer, the CardCode.  That's what this part does:  F0.CardCode = T0.Customer.  In my internal convention, I used F for Filter.  So we only want the results in the filter where the CardCode matches the CardCode/Customer from the main query tables.  It's the sole contact point between the two queries.
    You also said you wanted only the items where they had purchased no consumables, which basically translates into: a count of the records equals 0.  Now, since all we're interested in from the second query, the consumables query is how many records we returned, we get rid of all the columns except for one that we apply a COUNT to.  After that, it's a simple criteria:  the result of the second query has to equal 0.  This is how the criteria looks after you take out all the details and put only the important brackets in:  (SELECT COUNT...FROM...WHERE...) = 0.
    This might be confusing at first, because most of the time we return recordsets from queries, but a standard feature of SQL is to return a value of any data type if the query returns a single row and a single column.  This wouldn't work at all if we had more than one column in our nested query (or would require lots of tweaking), and although it returns a number of results in the complete process of the whole SQL statement, it only returns one result for each row.
    Regards,
    Mark Dielmann
    Edited by: Mark Dielmann on Nov 13, 2009 12:30 PM - Forum doesn't support advanced formatting on answered questions.
    Edited by: Mark Dielmann on Nov 13, 2009 12:32 PM - Salutations and more formatting.
    Edited by: Gordon Du on Nov 13, 2009 10:35 AM - There are maximum characters limitation for correct format

  • Portal users who have logged in during a specified time interval ?

    Hi,
    I need to know all the users who have logged in to the portal during a specific interval of time e.g during the last 10 days. Is there any provision to write code using UME api ?
    Any help would be highly appreciated and rewarded.
    Thanks & Regards,
    Sudhir

    Hi Jaga, Thanks for your reply.
    This is what i needed.
         Vector v=new Vector();
         IUserAccountFactory uaf = UMFactory.getUserAccountFactory();
         IUserAccountSearchFilter userAccountSearchFilter=uaf.getUserAccountSearchFilter();
         userAccountSearchFilter.setLoggedInBetween(fromDate,toDate);
         ISearchResult sr = uaf.search(userAccountSearchFilter);
         while(sr.hasNext())
                         IUserAccount ua = uaf.getUserAccount((String)sr.next());
              IUser tmp = ua.getAssignedUser();
              v.add(tmp);

Maybe you are looking for

  • Zend AMF extremely slow first request

    Hi all, I'm having a weird problem with Zend AMF and was wondering if anyone else has seen this before. I've got a very simple PHP/MySQL backend that returns multidimensional arrays to Flex via Zend AMF. Now this all worked fine up to the point that

  • How can I set my Ipod Classic to play the next podcast rather than repeating same one

    I have several episodes of a podcast on my Ipod Classic. I would like to set it so that when one finishes, the next episode starts. How can I do this?

  • Adobe Reader X freezes when I try to open recent files

    When I try to open recent files, Adobe Reader X will freeze up and will stay that way until I restart the computer. Even logging off won't work. I recently left it alone for around 5-10 minutes and Windows finally did end up stopping the process, but

  • Plotting a map in java

    Hello, I am busy with a project in which I have to create an applet where a map can be viewed.Actually I have finished creating the applet.My problem is I don't know how go about drawing the map in java.I have the coordinates but I don't know how I a

  • Don't know user account password

    I transferred all the information from my pc to my mac pro. Now I have a problem. I go to the user that it's under but I don't know the password for it. How in the world do I figured out the password. It's been years