Thursday, 14 July 2011

Oracle - Blocking Session

Show blocking sessions

Blocking sessions occur when an insert, update, delete is being issued and a commit has not been performed, this locks the row and prevents other users from making any changes to it.
SELECT blocking_session
, username
, sid
, serial#
, wait_class
, seconds_in_wait
FROM v$session
WHERE blocking_session IS NOT NULL
ORDER BY blocking_session;
From here we can see which user(s) are blocking the sessions and go and find out why.

No comments:

Post a Comment

Please feel free to leave a comment