How to find out the locks in the table

Any query anybody have to find out locks in any table.

Here is a version with SID and serial# data:
set linesize 150;
set head on;
col sid_serial form a13
col ora_user for a15;
col object_name for a35;
col object_type for a10;
col lock_mode for a15;
col last_ddl for a8;
col status for a10;
break on sid_serial;
SELECT l.session_id||','||v.serial# sid_serial,
       l.ORACLE_USERNAME ora_user,
       o.object_name,
       o.object_type,
       DECODE(l.locked_mode,
          0, 'None',
          1, 'Null',
          2, 'Row-S (SS)',
          3, 'Row-X (SX)',
          4, 'Share',
          5, 'S/Row-X (SSX)',
          6, 'Exclusive',
          TO_CHAR(l.locked_mode)
       ) lock_mode,
       o.status,
       to_char(o.last_ddl_time,'dd.mm.yy') last_ddl
FROM dba_objects o, gv$locked_object l, v$session v
WHERE o.object_id = l.object_id
      and l.SESSION_ID=v.sid
order by 2,3;

Similar Messages

  • How to find out which type of the driver is used in our application?

    Hi all,
    can anyone tell me how to find out which type of the driver is used in our application?
    Thanks in advance,
    Phoeniox

    Hi,
    Check out this...
    Class.forName("com.mysql.jdbc.Driver"); //if u r using MySql
    List drivers = Collections.list(DriverManager.getDrivers());
                   for(int i=0;i<drivers.size();i++)
                        Driver driver = (Driver)drivers.get(i);
                        String driverName = driver.getClass().getName();
                        System.out.println("Driver "+i+":::"+driverName);
    you need to load the driver and display in the same program.
    Then only you'l get the required result.
    prakhyath

  • How to find out who has deleted the production Query

    Hi All,
    I have searche SD , i can find it for infoobject deletion but i couldn't find it for Query.
    Please let me know is there any possiblity to kow
        How to find out who has deleted the production Query
    Awaiting for your replies.
    cheers

    Hi Mahesh and all,
    Thanks for all your  inputs.
    I have tried with RSRREPDIR tabel , I am unable to see that query at all.
    If I use theT-code SLG1,
      please guide me on the steps with paramets to be given in the respective ..object, subobject etc..
    OR
    could you please suggest any other way.
    cheers
    leena

  • How to find out who had deleted the function moldule? S O S

    how to find out who had deleted the function moldule Thank you very much.

    if this fm was assigned to device class (package) you'll find it in
    tables tadir, e070, e071
    try with name of function module or function group
    hope that helps
    Andreas

  • How to find out what are all the change pointers assoicated for an idoc ??

    Hi ,
    How to find out what are all the change pointers activated for an idoc ??
    Thanks,
    Varma

    Verma,
    You can check what are the active Change Pointers for the message type in tcode <b>BD50</b>
    Use tcode <b>BD61</b> to check whether change pointers are active or not??
    Hope this helps..

  • How to find out, who locked the same row

    Dears,
    I have a problem,
    sometimes our user complain that, when he tyring to make a transaction to a specific customer's Account
    its says 'Some other user access the same account, keep trying...' (like this).
    and in this response I just kill that user's session. then he can make the transaction by reconnecting.
    sometimes my solution(killing the session) can not slove this problem.it stayed even 5/6 hours long.
    in this time,i cannot find any bloking session or such a long waiting session.
    In this Scenario..
    I need to find out who(SID,SERIAL#,USERNAME) locked the same ROW (not table).
    There are many users who are locking different rows of the same table at the
    same time. I need to find the one who locked my row.
    is it possible to find out, who locked the specific customer's Account ?
    I am trying to find out by the following query but failed.
    SELECT s.SID, serial#, machine, osuser, terminal, b.object_name,
    row_wait_obj#, row_wait_file#, row_wait_block#, row_wait_row#,
    DBMS_ROWID.rowid_create (1,
    row_wait_obj#,
    row_wait_file#,
    row_wait_block#,
    row_wait_row#
    ) rowidd
    FROM v$session s, dba_objects b
    WHERE s.row_wait_obj# = b.object_id
    SELECT *
    FROM (SELECT s.SID, serial#, machine, osuser, terminal, b.object_name,
    row_wait_obj#, row_wait_file#, row_wait_block#, row_wait_row#,
    DBMS_ROWID.rowid_create (1,
    row_wait_obj#,
    row_wait_file#,
    row_wait_block#,
    row_wait_row#
    ) rowidd
    FROM v$session s, dba_objects b
    WHERE s.row_wait_obj# = b.object_id)
    WHERE rowidd IN (SELECT ROWID
    FROM account_mas
    WHERE branch = '999' AND accout_no = '009990215454')
    please help me...
    My Database version- 10.2.0.4, windows
    Regards
    Halim
    Edited by: Abdul Halim on Oct 26, 2009 2:43 AM

    Just check with this query, find the lock and kill the session.
    select b.session_id ,a.SERIAL#, a.username "Blocker Details"
    from v$session a,dba_lock b
    where b.session_id = a.sid
    and b.blocking_others = 'Blocking';
    Regards
    Asif kabir

  • How to find out which user has the permission to execute startsap ?

    Hi All
    How do I find out which user has the permission to execute the startsap and stopsap? Do I control the permission on those script using windows standard authorization? For example: only allow certain user have the read and write permission?
    Thank you.!
    Vincent Lo

    Well to me this is really weird question..
    <b>noone un-authorized should have access to OS on your system</b>
    If this is valid you do not need to solve problems who can and who cannot start/stop SAP, because if you want to prevent some users from shutting down the SAP you have really hard job to do - there are many ways how to kill the SAP (for example killing relevant process from task manager, killing of database, messing with services etc.) - yes, this is harmful way of stopping SAP, but we are talking about attack, right? I would contact some Windows specialist to help you disable all the ways how to harm the running SAP. But still after that - there are many files that can be modified/deleted so SAP will crash after restart - you need to protect them too, etc.
    In case you take the first assumption as granted (and you really limit access to this server) you do not need to worry who can stop or start SAP - at the other hand it may be handy to be able to start/stop SAP from other users - for this you can run the stop/start script "under different user".
    But to answer the question - to me this is question just of access control (but really never tried that myself):
    <a href="http://technet2.microsoft.com/WindowsServer/en/library/c6413717-511e-42bd-bd81-82431afe4b2a1033.mspx">Permit or restrict access to a snap-in for a domain</a> (or see other related links down there on this page)
    Please award points for useful answers.
    Thanks

  • System log - how to find out who has deleted the req from cube.

    ^hello friends
    how can i find out who has deleted the request from cube ?
    i wanted to check the system log , that who has deleted the request from cube .
    could you please let me know how to check the same ?
    regards
    manoj

    Hi,
    Did you try the method I had suggested. It will work.
    Also its better to try the path I had suggested as it will display the logs for that particular Cube only.
    But if go through SM37 > B_DEL* it will display all the logs for all the deletion jobs not just this cube and it will be difficult to find out.
    Try that and you should get the log.
    Thanks,
    JituK

  • How to find out who has released the purchase order?

    Hi All,
    I have a PR number lets say 10231322 and somebody has release it. Could any one please tell me how to find out who has release it?
    Waiting for your kind replies......
    Thanks in advance.
    Regards,
    Faisal

    Hi,
    When you are in tr ME23N, use the menu: environment > header changes.
    Rgds,
    Suzy

  • How to find out program name to the corresponding output type of invoice..

    hi ALL,
    I want to findout program name to my output type.
    For one invoice functional peoples are configured. Here i know the outtype. But i don't know the program name .
    Can any body please tell me how to find out the program name for the output type..?

    Hi,
    Goto NACE t-code
    Select Billing (V3)
    Press 'Output Types' Button
    In the next screen select the corresponding output type you want.
    Then press 'Processing Routines' in the left pane. You can see the program name
    Cheers,
    Kothand

  • How to find out which one of the few devices connected to the account made a purchase through ITunes?

    How can I find out which of the devices assosiated to my account made a purchase?

    the only reliable way to do this is by scanning table TBTCP using the person's userID in field AUTHCKNAM and filtering by job statuses: scheduled, released, ready and active (sorry I can't remember the code#'s off top of my head, something like P=scheduled, S=scheduled...you have to look it up).   When you search SM37 it only permits you to scan by the userID who created the job, but it won't tell you if a different userID is defined in a job step.  That's why you need to scan TBTCP.  Don't forget that you should also check for a user's open Workflow items before deletion.
    I noticed some posts in this forum that suggest a userID should never be deleted, only locked, added to a special user group, and all role assignments removed.  However I've never worked somewhere that does this.

  • How to find out which usb is the fastest

    How can you find out which usa port is the fastest, using a mypassport for my  backup photos??

    It's called a USB (Universal Serial Bus).
    All the USB ports operate within a given speed range. You have USB2.0 on your iMac. All your USB2 ports operate at the same speed up to 480MB/sec. Realistically you'll only see ~300MB/Sec.
    Pick a port and use your backup drive.

  • How to find out what is using the native heap of a process running a JVM?

    Hello,
    I am not sure where to post this question so I am starting here.
    I am troubleshooting a Java application using some native calls (32 bits Java running on Solaris 10). The size of the process (as reported by prstat) is slowly increasing day after day.
    The size of the 'Java heap' is fixed at the start (-Xms and -Xmx are set to the same value on the command line when launching the Java app) and the GC is workling fine. No memory complaints from the Java side of the application.
    It is the size of the 'native' heap (as reported by 'pmap') that is increasing:
    root@mas01 # pmap 5382
    5382:/apps/java/bin/java -server -Xms207M -Xmx207M -XX:MaxNewSize=24M -XX:N
    00010000 64K r-x-- /apps/jdk1.5.0_19/bin/java
    0002E000 16K rwx-- /apps/jdk1.5.0_19/bin/java
    00032000 3896K rwx-- [ heap ]
    00400000 389120K rwx-- [ heap ]
    18000000 2784K rwx-- [ heap ]
    DCAF4000 48K rw--R [ stack tid=169 ]
    DCBF6000 40K rw--R [ stack tid=161 ]
    DCCF8000 32K rw--R [ stack tid=160 ]
    My first reaction was to search for a memory leak. Found a minor leak in the JVM with the ::findleak function (called within the mdb debugger). Upgraded to a later release of Java 5 (Java 1.5.0_19) where the leak is fixed but the heap is still increasing.
    Many parts of the process allocate memory in the native heap. The JVM itself, the native calls made to a C++ library part of our Java application and maybe also some 3rd party software.
    I would like to know what is the best way to find out what is consuming more and more memory in the native heap. I started looking a DTraces but I am new to this. I also thought maybe the Solaris Perftools might be of use but I never used them. Before plunging into a tool more or less blindly, I am asking for advices on how to tackle this issue. Can someone recommend a tool/method to see what is allocated in the heap?
    Regards,
    Stéphan
    Edited by: StephanDupont on Sep 22, 2009 8:47 AM

    After googling a lot I managed to run my application with libumem, generated a core file and succeeded to find some leak with mdb even if ::findleak reported nothing.
    Does anyone knows if the ::findleak (you need libumem and mdb) is supposed to find leak in the native part of the memory and a Java application using the JNI interface?
    Regards,
    Stéphan

  • How to find out who has release the purchase requisition?

    Hi,
    I have a Purchase Requisition Number with me and I want to know who has released it. Can any body please help me how to find this?
    Waiting for your valuable responses! Thanks in advance.
    Regards
    Faisal

    Hi,
    Thanks for your response. However, is there not any tcode by which we can find it out?
    By the way I have done the following to find it. Kindly confirm if I have done it correctly:
    1. Executed tcode me23n
    2. Menu Purchase Requisition->Other requisition
    3. Specified the PR number.
    4.Menu Environment -> Item Changes
    5. Here in this screen, I got some information saying :
           Person responsible (user id), Date, Time, Transaction, Change Doc etc..
    Here it says that, one user executed tcode me54 and release indicator is changed to 3.
    I think this is only the user who has released it.
    Anyway, kindly confirm the same.
    Regards,
    Faisal

  • How to find out which control triggered the event?

    In my program, there are six buttons that does similar things, like changing the value of an array depending on which button is clicked. I used an event structure to do this. However, instead of repeating my codes six times in six events (one for each button click), I'd like to program one event case that responds to any of the six buttons. The question is, how do I know which button is clicked inside the case (any of the button can be either false or true, so reading the button value won't help)?
    Solved!
    Go to Solution.

    Steve Chandler wrote:
    Jeff Bohrer wrote:
    Oh when will the snipet tool get fixed?
    Jeff, are you using Ton Plomp's Code Capture tool? It is awesome for a lot of reasons. The nicest part is that when you do a capture it saves the snippet to a temporary file and places the path to the temp file in the clipboard. You can create a VI, capture a selection, then in the browse for image control on the forum you just paste the file name from the clipboard. No need to go through the hassle of saving the snippet first then browsing for it.
    Unfortunatly I'm behind a curtain here that discourages third party tools. I know of the third party stuff but it might as well not exist unless it comes on the installation DVD.  Thanks for the response though some other member may find the link useful
    I can't even load Firefox on this machine and am stuck with IE
    Jeff

  • RegEx: How to find out which part of the pattern failed?

    Hi there,
    I was wondering: is there any way to find out where the pattern matching failed?
    Say I got the string "John Paul Yoko Ringo", and I want to match it against the pattern /John Paul George Ringo/.
    I would like to know something like "pattern failed at index 11", or if I had groups something like "matching group 3 failed".
    Is there any way to do this? Thanks in advance!
    Best regards,
    - Torben

    jschell wrote:
    I would like to know something like "pattern failed at index 11", or if I had groups something like "matching group 3 failed".
    Is there any way to do this? Thanks in advance!
    I wonder if that is reasonable. It means that the parse tree for the regex would need to keep mapping information.
    At a minimum it is going to require an array, not a single result, because a regex can 'fail' in many ways.
    Consider the following regex with the following input
    /(a|b)d/
    abababababx
    Where does it 'fail'?Right. If you just want the character position at which it failed, those tools might tell you that as part of a bigger picture. But by itself, without any context, that number's not necessarily meaingful. A given character can be examined many times due to backtracking. Part of the expression could succeed for part of the input, then the expression might fail for the rest, so we backtrack, and may get several more failures, then more partial successes, all at different points, then ultimately it may fail anywhere within the input.
    So just knowing where isn't enough. You need to know what steps were taken to get there. I do think these tools provide that, though I haven't looked closely.

Maybe you are looking for