Re: Efficient way to detect lock contention/blocking sessions

  • From: MVE <mvetmp-ora@xxxxxxxxx>
  • To: jayaraj.rengarajan@xxxxxxxxx
  • Date: Thu, 6 Apr 2006 18:11:29 -0700 (PDT)

To quickly ID what's going on in terms of locks/blocks I use the following
script (tested/optimized on 8i/9i):

   http://www.dbatoolz.com/sql/s_locked_obj.sql

   Reports the following:
     -  object locks from V$LOCKED_OBJECT
        using PL/SQL loops since join of DBA_OBJECTS
        and V$LOCKED_OBJECT is extremly slow
     - blocked objects from V$LOCK and SYS.OBJ$
     - blocked sessions from V$LOCK
     - pulls blokers session details from V$SESSION and V$SQLTEXT

- Vitaliy
--
//www.freelists.org/webpage/oracle-l


Other related posts: