Query to check blocking sessions in Oracle database from v$lock:
SELECT DECODE(request,0,'Holder: ','Waiter: ') || sid sess,
id1,
id2,
lmode,
request,
type
FROM v$lock
WHERE (id1, id2, type) IN
(SELECT id1, id2, type FROM v$lock WHERE request > 0
)
ORDER BY id1,
request;
id1,
id2,
lmode,
request,
type
FROM v$lock
WHERE (id1, id2, type) IN
(SELECT id1, id2, type FROM v$lock WHERE request > 0
)
ORDER BY id1,
request;
No comments:
Post a Comment
Was this Post Helpful?
Feel free to suggest your opinions in the comments section!