Forgot your password?    
+ Reply to Thread
Results 1 to 1 of 1

Thread: Script to check blocking lock in DB (9i and earlier)

  1. #1
    Oracle DBA
    Join Date
    Dec 2011
    Posts
    3

    Script to check blocking lock in DB (9i and earlier)

    REM For 9i and earlier

    select (select username from v$session where sid=a.sid) blocker,
    a.sid,
    ' is blocking ',
    (select username from v$session where sid=b.sid) blockee,
    b.sid
    from v$lock a, v$lock b
    where a.block = 1
    and b.request > 0
    and a.id1 = b.id1
    and a.id2 = b.id2


    For 10G Onwards , Refer to : Script-to-find-locks-blocking-and-waiting-sessions
    Last edited by Hemant; 01-10-2012 at 06:44 PM.

+ Reply to Thread

Similar Threads

  1. Script to find lock object
    By Amit in forum Database Scripts
    Replies: 0
    Last Post: 11-04-2011, 12:46 PM
  2. Script to check the Database space
    By Amit in forum Database Scripts
    Replies: 0
    Last Post: 11-03-2011, 03:53 PM
  3. Health Check script for RAC DB
    By Amit in forum Database Scripts
    Replies: 0
    Last Post: 11-03-2011, 12:41 PM
  4. Script to find locks - blocking and waiting sessions
    By Hemant in forum Database Scripts
    Replies: 0
    Last Post: 11-02-2011, 07:21 PM
  5. Script to check if SSO in Enabled
    By Amit in forum SCRIPTS : Users,Profiles,Applications,Responsibilities,Forms,JDBC,Patch,Versions,Products
    Replies: 0
    Last Post: 11-01-2011, 03:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training


Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics