April 2017

Kill Sessions Running a Program

Handy script to kill all sessions that are running a particular package: select distinct ‘ ALTER SYSTEM KILL SESSION ‘||””||sid||’,’||serial#|| ‘,@’ || inst_id ||”” ||’  IMMEDIATE;’   from gv$session s where EXISTS ( select ‘x’ from gv$access a where object = ‘package name’ and a.inst_id = s.inst_id and a.sid = s.sid ) /

Read more →