How to see lock on table and query?

Hi All,
How do we see lock on table and query?
Thanks,
Rafi

Yes Rafi,
It is working fine at my end. See below:
Opened Session 1 with scott/tiger and:
update emp set ename='xx' where empno=7499;
Opened Session 2 with scott/tiger and:
update emp set ename='xx' where empno=7499;
<<Its lock here>> This session is locked by above one.
Opened Session 3 with sys/pw as sysdba and:
SQL> set serveroutput on
SQL> BEGIN
  2  dbms_output.enable(1000000);
  3  for do_loop in (select session_id, a.object_id, xidsqn, oracle_username, b.owner owner,
  4  b.object_name object_name, b.object_type object_type
  5  FROM v$locked_object a, dba_objects b
  6  WHERE xidsqn != 0
  7  and b.object_id = a.object_id)
  8  loop
  9  dbms_output.put_line('.');
10  dbms_output.put_line('Blocking Session : '||do_loop.session_id);
11  dbms_output.put_line('Object (Owner/Name): '||do_loop.owner||'.'||do_loop.object_name);
12  dbms_output.put_line('Object Type : '||do_loop.object_type);
13  for next_loop in (select sid from v$lock
14  where id2 = do_loop.xidsqn
15  and sid != do_loop.session_id)
16  LOOP
17  dbms_output.put_line('Sessions being blocked : '||next_loop.sid);
18  end loop;
19  end loop;
20  END;
21  /
Blocking Session : 139
Object (Owner/Name): SCOTT.EMP
Object Type : TABLE
Sessions being blocked : 134
PL/SQL procedure successfully completed.HTH
Girish Sharma

Similar Messages

  • Reg: how to see the vendor details and general ledger details in tables

    HI all
    how to see the vendor details and general ledger details in tables.
    regards
    JK Rao

    General ledger transactions are available in following table;
    1. BKPF & BSEG
    2. BSIS - Open Items
    3. BSAS - Cleared Itesm
    For vendor
    1. BSIK - Open Items
    2. BSAK - Cleared Items
    For Customers
    1 BSID - Open Items
    2. BSAD - Cleared Items
    Regards
    Rakesh Pawaskar

  • How to see all the tables in ABAP

    how to see all the tables in ABAP
    i need to see all the tables present in tcode se16.

    Hi Thiru ,
    its tough to give all.so pls see the below links u can get all.
    http://www.erpgenie.com/abap/tables.htm
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=listofalltablesin+abap&cat=sdn_all
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.sap-img.com/ab017.htm
    http://abap-gallery.blogspot.com/
    thanks
    karthik

  • How to link Azure database tables and fields to VS2012 C++ entry form

    We are using Visual Studio 2012 C++ and have successfully connected to the database on Azure, but do no know how to associate the database tables and fields with the C++ application data entry forms.  Can anyone help?  Thanks

    Hello Roxanne,
    You could use Entity framework to map classes to Azure tables. Please refer http://www.codeproject.com/Articles/363040/An-Introduction-to-Entity-Framework-for-Absolute-B to
    learn more. Hope this helps.
    Regards,
    Kumar Bijayanta

  • Lookup-table and query-database do not use global transaction

    Hi,
    following problem:
    DbAdapter inserts data into DB (i.e. an invoice).
    Process takes part in global transaction.
    After the insert there is a transformation which uses query-database and / or lookup-table.
    It seems these XPath / XSLT functions are NOT taking part in the transaction and so we can not access information from the current db transaction.
    I know workarounds like using DbAdapter for every query needed, etc. but this will cost a lot of time to change.
    Is there any way to share transaction in both DbAdapter insert AND lookup-table and query-database?
    Thanks, Best Regards,
    Martin

    One dba contacted me and made this statement:
    Import & export utilities are not independent from characterset. All
    user data in text related datatypes is exported using the character set
    of the source database. If the character sets of the source and target
    databases do not match a single conversion is performed.So far, that does not appear to be correct.
    nls_characterset = AL32UTF8
    nls_nchar_characterset = UTF8
    Running on Windows.
    EXP produces a backup in WE8MSWIN1252.
    I found that if I change the setting of the NLS_LANG registry setting for my oracle home, the exp utility exports to that character set.
    I changed the nls_lang
    from AMERICAN_AMERICA.WE8MSWIN1252
    to AMERICAN_AMERICA.UTF8
    Unfortunately , the export isn't working right, although it did change character sets.
    I get a warning on a possible character set conversion issue from AL32UTF8 to UTF8.
    Plus, I get an EXP_00056 Oracle error 932 encountered
    ORA-00932: inconsistent datatypes: expected BLOB, CLOB, get CHAR.
    EXP-00000: export terminated unsuccessfully.
    The schema I'm exporting with has exactly one procedure in it. Nothing else.
    I guess getting a new error message is progress. :)
    Still can't store multi-lingual characters in data tables.

  • How to see lock status of a table ?

    Hi,
    My question is : how to see the lock status of a table ?
    and how to lock a table except run the FM ENQUEUE_TABLENAME?
    Is there any transcation that can lock a table ?
    thx in advance.

    Hi Vincent
    Via transaction SM12 we can check the lock entries at a particular point of time...
    Kind Regards
    Eswar

  • Locking a table and then releasing the lock...

    Gurus,
    I ant to lock a table DMS_LO_CD1 and then do certain upodate and then release the lock after that.
    How can I d this ?
    Thanks.
    Regards,
    Rajesh.

    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
    Hope this helps.
    Regards,
    Midhun Abraham

  • How to see the TR'S in query

    Dear All, I would like to see  what are the TR's generated against the query and TR request details,Please advise how to see the details

    Hi,
    you can see TRs generated in tcode SE10 by entering user ID as per screen.

  • How to protect SAP Application Tables and Reports in R/3

    Hi Gurus,
                 Any one please explain me detail how to protect tables in R/3 with different senarios.
                  How to protect reports in SAP R/3 without assigning SA38 transaction access
                  How to protect Program in SAP R/3 in R/3

    Hello Happyman,
    <b>What do you mean by Protect Table, Program and Report?</b>
    Let me ask you one base Question, On which area are you working? Are you from functional side or Technical side (Developement or Basis guy)?
    This is very clear cut answer that with the restricted autorization you can protect table and programs. Do not provide the change autorization.
    CATCH your BASIS guy and he will do rest of the things. Just explain him what are you want to protect.
    Hope this helps.
    Regards
    Arif Mansuri

  • How can I lock a table so that a person can only enter data, not manipulate the table?

    I don't want to Lock the table as Numbers does it so perhaps locking is the wrong term. What I want to do is to lock the formatting of the table so it is possible to enter data but not possible to change the position, number of columns etc. I've been searching and all I can come up with is the regular lock function. But I still want to be able to use the cells. Just not change formatting.
    Thanks, Brad

    you cannot.  When you lock a table the whole table is locked.  I would consider segmenting the user input into a seprate, un-locked table and placing the calculations in a locked table

  • How to see the linked table in oracle 8.0

    hi,
    i am using oracle 8.0, i have some 8 to 9 tables in it, some of them are linked, is there any way i could see the linked tables, if you do know any utility pls let me know.
    regards
    user456932

    i am using oracle 8.0, i have some 8 to 9 tables in
    it, some of them are linked, is there any way i could
    see the linked tablesI understand from your question that you are refering to Referential Integrity. I.e you have Parent Tables with Primary Keys and Child Tables linked with Foreign Keys.
    It is easier to use GUI tools (OEM, Toad etc) to browse through them. In Toad for instance as a start, you can view the SQL Model. There are other Modelling tools you can use as well.
    For the start, you can check USER_CONSTRAINTS and other related dictionary views to find them.
    Here is a small example:
    select      constraint_name
         ,constraint_type
         ,table_name
         ,r_constraint_name
         ,delete_rule
         ,status
    from user_constraints;
    The constraint_type will show P (Primary Key), C (Check), R (Referential) etc
    However, you can use queries to find Object Dependencies in the Database.
    Read more from the SQL Reference Manual to get more knowledge in this area.

  • How to populate the main table and the lookup's at the same time

    Hi ,
       What I have with me is the XML files which contain the data from the material master and the excel sheet which talks about the mapping . it basically tells me which field of the main table maps to which field of which segment in the IDOC and also the name of the table and the field in the R3 system .
    I wish to use this info to populate the data in the material repository .
    - How can I populate the data in the lookup table at the same time when I am populating the main table ? I have only the XML's that correspond to the main table . I don't have seperate data for the lookup tables .
    - Can I use the standard maps available for import in the business content of material repository in MDM ?
    - If the answer to the second question is NO then I think i can create the maps and save them for future use .
    Regards
    Deepak Singh

    Hi, Deepak
    >>> - How can I populate the data in the lookup table at the same time when I am populating the main table ? I have only the XML's that correspond to the main table . I don't have seperate data for the lookup tables .
    I don't think you can populate both main table and all fields of lookup tables at the same time, i.e. using same map. You can consider 2 options to upload all information you have:
    1) If your XML file contains data you would like to upload to lookup tables, you can upload it to MDM lookup tables with several maps using same XML and choosing different sections of that XML corresponding to different MDM lookup tables.
    2) Also you can upload main table simultaneously with lookup table entries (using same map), but in this case new lookup table entries will only contain display field values that you mapped. To do this you should use 'Add' value mapping functionality for fields that you mapped to lookup tables.
    >>>- Can I use the standard maps available for import in the business content of material repository in MDM ?
    1) In case you have material master repository delivered by SAP and you use XML files which structure corresponds to SAP predelivered XSD schemas then you can use these maps undoubtedly.
    2) If your repository is based on SAP predelivered, but you changed it ,you should adjust these maps due to differences in repository structure and  XML files structure.
    3) If you created your repository from scratch you should consider option of making your own import maps.
    Regards,
    Vadim Kalabin

  • Some how I have locked my Screen and it will not rotate.  I tried to unlock it double taping Home but it didn't unlock it.  I'm sure this an easy fix but I'm a new iPad 2 user.

    Some how I have locked the screen on my iPad 2 and can't get it to rotate.  I tried double tapping the Home key but it didn't make a difference.

    Double tapping the home button won't unlock your screens orientation.  Double tapp the home button and swipe the bottom row of apps that appear and swipe them to the right all the way until an icon appears on the left side.  It should be either a mute icon, or orientation icon.  Hopefully, since your screen is not rotating, it will be the screen lock.  Touch the icon and that should solve your problem.

  • How to pass the JCO Table and Structure in a collection List to frontEnd

    hi,
    I have a BAPI which is returns me a Table and a structure. As i have used JCO I will receive it in JCO Table and JCO Structure. Now the question is that how I should pass both these of these using a collection to the frontend for displaying the data from it.
    Thanks' & Regards,
    Samir

    Hi Samir,
    As you are trying to pass the Table and the Structure in the form of collection to the JSP page, you can create a javabean with the structure similar to that of the table/Structure.
    Lets assume you have a table called Employee with Emp_Name, Emp_Age, Emp_Sal as three columns, create a java class by name Employee which implements Serializable and attributes as Emp_Name, Emp_Age and Emp_Sal. Generate the setters and getters for the same. In your EJB code, create an instance of this Employee class and set the attributes and save it in a HashMap in the form of key value pair, Value being your Employee class instance and key be your Employee Name. Return the HashMap in your EJB code.
    Use the HashMap in your JSP. Get the Iterator for the HashMap and Loop through the keys to get the values.
    Hope this helps.
    Regards,
    Rekha Malavathu

  • How to find Fragmentation of tables and tablespaces in oracle 8i

    Hi,
    How can i measure the fragmentation of Tables and Tablespaces in oracle 8i.
    Do any one have any handy script to find the same.
    What are the attributes to be determined to do health checkup of a database.

    how many such empty blocks are there in the table and of what size.Again Tom Kyte reference :
    http://asktom.oracle.com/pls/ask/f?p=4950:8:7760471022221195640::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:231414051079
    For tablespace, fragmentation is the regular termAbout tablespace, the link from post above can help.
    Nicolas.

Maybe you are looking for

  • Combine csv files and insert source filename

    Newbie powershell question - Need help combining multiple csv files (100+) and inserting a column containing the name of the source file ex:  Apples.csv A,B,C,D 1,2,3,4 Oranges.csv A,B,C,D 1,2,3,4 Desired output would look like this: combined.csv A,B

  • Asset is deactivated

    Hi Experts, Asset # xxxxxwas set-up and a Purchase Order No. 123456 was prepared. A partial payment was made with this PO. But before the full payment was made, we transferred the full amount to Asset No. yyyyy Now, I am making the full paymentu2026

  • IPad Gmail problem

    After updating my iPad to v. 4.3.3 my Gmail account won't let me open Word docs or PDFs.  Have re-started iPad, have used more than one web browser - same problem.  Any suggestions? Thank in advance!

  • Every time I start up iPhoto and some other apps my computer just shuts down and restarts.

    My Mac Book Pro 2010 is repeatedly shutting down whilst I'm using iPhoto mainly. It also happens with other apps occasionally and when it does I get this error message: 4MEM/61/40000000: Oxa4d73598 or something similar. I also had this: Apple Hardwar

  • Segments in a file

    Hi all, What do you mean by Segments in a file  ? What is the difference Between Record and  a Segment ? General definition of a File is : file is a group of records and Record is a group of  fields.....right ? Thanks in advance Krish...