Printing ASCII table


A Very short SQL to find out blocking sessions in Oracle. Can be very usefull if users are complaing about a session haning. This would be a quick check to make sure no sessions are blocked.

select l1.sid, ' IS BLOCKING ', l2.sid
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;




Copyright © 2007, All rights reserved by RudnikConsulting Inc