Blocking locks

———————————sql start———————————
SELECT DISTINCT
s.sql_text blockersql,
a.*
FROM
(
SELECT /Parallel 10/
s1.machine blockermachine,
sql2.sql_id blockersqlid,
l1.sid blockersid,
s1.serial# blockerserial,
‘ IS BLOCKING ‘,
l2.sid blockedsid,
s2.serial# blockedserial,
sql2.sql_text blockedsql
FROM
v$lock l1,
v$lock l2,
v$session s1,
v$session s2,
v$sqltext sql2 — , V$SQLTEXT sql1
WHERE
l1.block = 1
AND l2.request > 0
AND l1.id1 = l2.id1
AND l1.id2 = l2.id2
AND s1.sid = l1.sid
AND s2.sid = l2.sid
AND s2.sql_id = sql2.sql_id
) a
INNER JOIN v$sqltext s ON s.sql_id = a.blockersqlid;
———————————sql end———————————