Thursday, August 19, 2010

Kill Oracle User Session

1. Found out the sid and serial#
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.username = 'dbusername';

2. Kill the user session
ALTER SYSTEM KILL SESSION 'SID,serial#';

No comments:

Post a Comment