Database Tuning (MOSC)

MOSC Banner

How to check Blocking Locks on version >= 10g

edited Aug 25, 2011 7:14PM in Database Tuning (MOSC) 12 commentsAnswered
We can check lock in v$lock and many Systems write SQL to monitor about Blocking Locks.Example:
A. select INST_ID, SID, TYPE, ID1, ID2, LMODE, REQUEST, CTIME, BLOCK
from gv$lock where (ID1,ID2,TYPE) in
(select ID1,ID2,TYPE from gv$lock where request>0);

B. select * from dba_blockers;

C. select 'Session ID=' ||SID ||'(Inst '||INST_ID||') IS BLOCKED BY Session ID='|| BLOCKING_SESSION || '(Inst '||BLOCKING_INSTANCE||')' from gv$session where  BLOCKING_SESSION is not null;

D. ....

What is your SQL to monitor about Blocking Locks?

On 11gR2 v$lock ... wait many with 'direct path read temp', so I use choice C.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center