How to see the lock on the table and query?

Hi all
How do we see the lock on the table and query?


Thank you
Rafi

Yes Rafi,

It works fine at my end... see below:

Opening of Session 1 with scott/tiger and:
setting a day emp set ename = 'xx' where empno = 7499;

Opening of Session 2 with scott/tiger and:
setting a day emp set ename = 'xx' where empno = 7499;
> This session is locked by a superior.

Open 3 Session with pw/sys 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

Tags: Database

Similar Questions

  • How I see the size and the color of the text in DW Cs5?

    Hello forum, how do you see the size and the color of a piece of text in Dreamweaver Cs5, I text in a dreamweaver file, which is a size that I like and a color I like and I want to do a CSS rule with these features. How can you see what the size and color of a text element is?

    Thanks a lot for any help

    Gareth

    what is the text size, colour and boldness of this piece of text.

    Above code is obsolete.  CS5 won't get these styles in the Panel styles CSS.  Ancient sites are not simple to work with.  They must be converted to modern standards.  For this markup stripping and re-writing of CSS styles HTML styles.

    This is a normal paragraph

    Put your CSS styles between your documentandTags:

    Alternatively, create an external style sheet to which your HTML documents are related to this:

    http://ALT-Web.com/demos/DW-link-stylesheet.shtml

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • How to see the VSwitch and PortGroup properties in the managed object browser

    Hello

    We have a laboratory infrastructure VI3, with a VC and some ESX servers running.

    In the managed object browser, I'd like to see the properties of certain objects,

    especially the VSwitches and exchanges.

    How do I see VSwitch and exchanges from the CROWD. Here's my data:

    ESX IP address: 192.188.0.228

    VSwitch name: vSwitch0

    The port group name: VM_PG

    I know that we can see these properties of Client VI, but I really want to see values

    returned for each of the attributes defined in the WSDL file and the CROWD precisely

    allows me to do. This will help me to do a bit on our end of modeling.

    I tried, but I couldn't really vSwitch. Grateful if someone can give inputs.

    Thank you

    Try this:

    https://A.B.C.D/mob/?moid=ha-host&doPath=config.network
    

    and more precisely which lists out them the portgroup and vSwitches

    https://A.B.C.D/mob/?moid=ha-host&doPath=config.network
    

    =========================================================================

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    http://Twitter.com/lamw

  • How to see the date and time on your images?

    I use camcorder Sony HXR-NX5U to shoot my video which I then edit in Premiere Pro. How can I record the date and time based on actually recorded video? Is a function that I need to set up on the camera or these data incorporated into each HD clip and all I have to do is just to change some settings in Premier Pro, as well as the date and time appear magically on my video?

    He is a third-party software which costs $80 to show the date and time. This is not an option.

    Can I ask you why you do this?  It of a unique client work, a curiosity or are you in the business of generating media for legal needs?  Adobe has access to view the metadata of the files in the metadata panels, however, source time is not available in timecode effects and overlays customized (via the program monitor tools).  It will be manual labor, which is ok if it is the specific need.  However, if it is a constant for your business, you must consider the types of tools that apply best practices (as the camera that allows you to record recovery /) or by using a third party tool like the one I mentioned.  No free lunch.  This has been a feature of the long and often requested.

  • How to see the progress and speed of download

    If I compare the android version and mozilla Office, so my 1 question is why there is no progress or status file that we download from the menu of the download page in mozilla android?

    This isn't a feature of Firefox for Android.

  • After the reopening of the dreamweaver files, the table and its contents do not appear in design mode

    I had a problem with the deisgn opinion that caught me all week. I designed a Web page with dreamweaver CS4. After having reopened this Web page, I got the problem to see the tables and images inserted in dreamweaver (the images cut into slices of Fireworks works well). Somehow this problem existed only in design, but is NOT seen on browser / see live.  I thought that it is the problem of adjustment, but I tried to reopen the Web page I designed earlier... you have no problem in design or mode live view. I also tried to start another file, same problem existed (tables/images do not display in design) I'm really confused. Any thoughts?

    I've already done my research in the world, but cannot find solution.

    You closed the first cell in what appears to be your content area.

    />

    Must be:

    Write it down / at the end of the

    is removed from the version "should be."

    Enjoy.

    _T

  • How to purge the table ECX_OUTQUEUE of the ECX_OUTBOUND AGENT

    How to purge the table ECX_OUTQUEUE of the ECX_OUTBOUND AGENT

    904632 wrote:

    How to purge the table ECX_OUTQUEUE of the ECX_OUTBOUND AGENT

    Please see (how to recreate the ECX Related queues? (Doc ID 1354312.1)).

    Thank you

    Hussein

  • How to see the info of waiting events. After executing a statement select query

    Hello

    How to see the info of waiting events. After running a select query. Is there a setting to the value of this option?
    And I also want to see the following info. in the trace file. For this, what are the settings I need to adjust to the right?
    SELECT * FROM emp, dept 
    WHERE emp.deptno = dept.deptno;
    
    call   count      cpu    elapsed     disk    query current    rows
    ---- -------  -------  --------- -------- -------- -------  ------
    Parse      1     0.16      0.29         3       13       0       0
    Execute    1     0.00      0.00         0        0       0       0
    Fetch      1     0.03      0.26         2        2       4      14 
     
    Misses in library cache during parse: 1 
    Parsing user id: (8) SCOTT 
    Concerning
    Evelyne

    For

    SQL > show parameter dump;

    ORA-00942: table or view does not exist
    >
    Use

     GRANT SEECT ON v_$parameter to Your_User_Name
    

    For

    SQL > ALTER SESSION SET EVENTS = 10046 trace name forever, context level 12';

    ERROR:
    ORA-01031: insufficient privileges
    >
    Use

     GRANT ALTER SESSION to your_user
    
  • How to check the table reused in oracle 10g space?

    Hello..

    Of my system, I see table size keep growing event the deletion request is running. Because of this, I would like to check either the allowed oracle to reuse space table or not? If not then how can I enable it?


    Please help me...


    Thank you
    Balleur

    You can use dbms_space.space_usage to check for free space.

    Reuse of the space will depend on whether you use MSSM or SAMS, PCT_FREE, PCT_USED and the way in which new data is inserted?

    You can reduce or move the table and rebuild the index to reclaim space.

  • How to see the content of what's currently on my iCloud of this site

    How to see the content of what's currently on my iCloud.  I would like to see these files presented in a display of file manager type in order to sort and remove if necessary.

    Go to iCloud.com, then click on your iCloud drive icon.  I hope this is what you mean or what you are looking for.

    iCloud Drive FAQ - Apple Support

  • How to see the old registered devices?

    How to see the list of disabled devices?

    If you have devices that are associated with your Apple ID, to the use of the content purchased from iTunes Store or access to subscription services, I don't think that there is a list of previously associated devices that are no longer associated.  I don't know what you mean by devices 'off '.

    If you ask about "old devices registered" on your Apple ID support profile, they must always be there.  This list is mainly for the purpose of support services.  You can check here

    https://supportprofile.Apple.com/

  • How to see the level of ink for a dell v515w printer?

    Separated from this thread.

    How to see the level of ink for a dell v515w printer?

    Hi Albert,

    I appreciate your time display. You can refer to the manual for more information. http://www.Dell.com/Ed/business/p/Dell-V515w/PD

    To better help, contact Dell technical support.

    http://en.community.Dell.com/support-forums/peripherals/

    Thank you.

  • My task manager only to see the task and not, application, process, etc. How can I get it back to normal?

    My task manager only to see the task and not, application, process, etc. How can I get it back to normal?

    If it does not display all the tabs, double-click the external border of the Task Manager.

  • How to create a grid with the tables and Boolean values?

    As part of a larger project, I'm trying to create a Subvi, which will allow me to spend a "cursor" in a 3 x 3 matrix.

    It should be 2 Boolean inputs, one for move them down in the table and the other to move them to the right. Once reached the edge of the table, the "cursor" will start back at the beginning.

    I have a vague idea of a table to 2 dimensions with LED. Once 'down' has been selected, the corresponding light to (0,0), light (0.1). Goes the same for the button 'right '. When 'down' is pressed (0.2), the LED should turn off, and LED (0,0) must light up.

    I'm sure it has something to do with the initialization of the tables, but I can't seem to find the right way to do it.

    Any help is much appreciated. Thank you!

    Your array is always empty.  Look at the detailed help for the function page replace table subset.  He says that the function has no effect if the specified index refers to a location outside the table.

    What you see on the Panel is only a view and has nothing to do with what is in the table.

    Lynn

  • All the fonts/writing are gibberish and I can't not as what is written, so I can't change anything on my vista, how to see the writing again if I can read? Thank you

    All the fonts/writing are gibberish and I can't not as what is written, so I can't change anything on my vista, how to see the writing again if I can read? Thank you

    Try cleartype youre settings, follow this link.

    http://www.Microsoft.com/en-us/typography/default.aspx

    Also, look for downloads 'police' as you need...

    1, select "cleartype online setting" you will probably get a download popup, install the

    Update...

Maybe you are looking for