Oracle Database / Sessions, Locks & Transactions
Identify an Oracle blocking session before terminating anything
An application can appear frozen while waiting for another transaction. Locate the waiter and its reported blocker before choosing a recovery action.
Environment and inputs: Oracle Database 19c baseline · SQL*Plus-compatible SQL unless RMAN, DGMGRL, ADRCI or a host shell is specified. Check release, patch level, edition and container first.
Start with this diagnostic
Run each example in the tool named in the guide: SQL, RMAN, DGMGRL or the host command shell. Replace example names with approved values. To query DBA and V$ views, use authorized catalog access in the correct database container. Do not add broad permissions just to run an example.
SELECT sid, serial#, username, event, blocking_session_status, blocking_instance, blocking_session FROM v$session WHERE blocking_session IS NOT NULL;
What the results mean
The fields identify reported blockers for current waits. In RAC, the blocker may belong to another instance and must be matched there.
Fix the cause and check again
Find the blocker with its instance, SID and serial number, inspect its transaction and contact its owner. Prefer a controlled application commit or rollback when appropriate.
Before you make a change
Killing a blocker can trigger lengthy rollback and affect other users. Session IDs are reused.