Tag Archives: Killing

Killing Oracle Sessions

Finding a Oracle session to kill starts with First finding the offending Query. Than kill it with the alter system kill command.

SET LINESIZE 100 
COLUMN spid FORMAT A10 
COLUMN username FORMAT A10 
COLUMN program FORMAT A45 
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'; 
INST_ID SID SERIAL# SPID USERNAME PROGRAM 

---------- ---------- ---------- ---------- ---------- ---------------------------------------------
1 69 99 4879 TEST billbprog@my.telly 



ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE; or ALTER SYSTEM KILL SESSION '69,99' IMMEDIATE;