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
Use the stated SQL, RMAN, DGMGRL or host shell and replace sample names with approved targets. DBA and V$ views need authorized catalog access in the correct container. Do not grant broad privileges for an example.
SELECT sid, serial#, username, event, blocking_session_status, blocking_instance, blocking_session FROM v$session WHERE blocking_session IS NOT NULL;
Read the result
The fields identify reported blockers for current waits. In RAC, the blocker may belong to another instance and must be matched there.
Resolve and verify
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.
Operational precautions
Killing a blocker can trigger lengthy rollback and affect other users. Session IDs are reused.