Oracle blocking session query
Select INST_ID, SID, TYPE, ID1, ID2, LMODE, REQUEST, CTIME, BLOCK
DECODE (BLOCK, 0,', 'blocker') blocker
DECODE (request, 0,', 'waiter') waiter
From gv$lock where (ID1,ID2,TYPE) in
(select ID1,ID2,TYPE from gv$lock where request > 0)
Order by blocker
An example of the execution result is as follows:
INST_ID SID TYPE ID1 ID2 LMODE REQUEST CTIME BLOCK BLOCKER WAITER
1 70 TX 65539 2630730 6 0 2520 1 blocker
1 86 TX 65539 2630730 0 4 1654 0 waiter
Wait a moment to enter /, enter, and execute the above SQL again. If the blocking situation remains the same, confirm that the session with SID = 70 is a blocking session.
If the result shows no rows selected, it is normal.