using the blocking session number to find out the sql and user
select blocking_session || ' is blocking ' || sid || ' (' || username || ') and the wait event is ' || event "BLOCK_MESSAGE"
from v$session
where blocking_session is not null;
Sure enough there is a blocking session out there block the sid
BLOCK_MESSAGE
--------------------------------------------------------------------------------
1072 is blocking 962 (username) and the wait event is enq: TX - row lock contention
I looked at v$sql and couldn't find a common field that I can join the two views. How can I use the blocking_session number 1072 to find out the sql statement and the user who is making the lock?