Monday, February 17, 2014

Oracle locks in table

Check locks in the oracle table:


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;

2 comments:

  1. Sybase Online Training
    http://www.21cssindia.com/courses/sybase-online-training-159.html
    Sybase Introduction: Overview
    Sybase Architecture & Versions12.5 & 15.x,
    System and optional Databases,
    Sybase: Basic Concepts
    Database Objects
    Sybase server - Storage Units
    Security and User Administration
    Transact-SQL.
    21st Century providing Online training and support on All Technologies. If you are seeking training and support you can reach me on 91-9000444287. Online training by real time Experts. Call us 001-309-200-3848 for online training

    ReplyDelete
  2. Very Informative and creative contents. This concept is a good way to enhance knowledge. Thanks for sharing. Continue to share your knowledge through articles like these.

    Data Engineering Services 

    Data Analytics Services

    Artificial Intelligence Services

    Data Modernization Services

    ReplyDelete