Quantcast
Channel: Online DBA Support
Viewing all articles
Browse latest Browse all 35

How to find Blocking sessions.

$
0
0

Cause

Blocking sessions occur when one sessions holds an exclusive lock on an object and doesn’t release it before another sessions wants to update the same data. This will block the second until the first one has done its work.

 

Please execute the below query to find the blocking sessions and kill if necessary.

Solution

col WAIT_CLASS FOR a12;
SELECT blocking_session,
sid,
serial#,
wait_class,
seconds_in_wait,STATUS
FROM
v$session
WHERE
blocking_session IS NOT NULL
ORDER BY
blocking_session;

Viewing all articles
Browse latest Browse all 35

Trending Articles