Monthly Archives: November 2013

Killing Oracle Sessions

From http://www.oracle-base.com/articles/misc/killing-oracle-sessions.php

Identify the Session to be Killed

SELECT s.inst_id,
s.sid,
s.serial#,
p.spid,
s.username,
s.program
FROM gv$session s
JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE s.type != 'BACKGROUND';

ALTER SYSTEM KILL SESSION

ALTER SYSTEM KILL SESSION 'sid,serial#';

or

ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;