v$lock connect by prior

From: sundar mahadevan <sundarmahadevan82_at_gmail.com>
Date: Tue, 9 Oct 2012 13:08:07 -0400
Message-ID: <CADmQEr49+rwhXwX+6-rQOAzeVAisMDnJ_9xsFpozh8EZyUoC+w_at_mail.gmail.com>



Hi All,
Greeting. I am presently using the queries below to find out which session locks the others. But when the list becomes long, it becomes hard. I was wondering if i can somehow find the lock hierarchy with some query using connect by prior or something of that sort. Any help is appreciated. Thanks. select * from v$lock where block >0;
select l1.sid,' IS BLOCKING ',l2.sid,l1.type,l1.lmode from v$lock l1, v$lock l2 where l1.block =1 and l2.request > 0 and l1.id1=l2.id1 and l1.id2=l2.id2 order by l1.sid;
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Oct 09 2012 - 19:08:07 CEST

Original text of this message