Thursday, December 18, 2014

How to kill sessions from backend

SELECT c.owner, c.object_name, c.object_type, b.SID, b.serial#, b.status, b.osuser, b.machine   FROM v$locked_object a, v$session b, dba_objects c
WHERE b.SID = a.session_id
AND a.object_id = c.object_id;  

ALTER SYSTEM KILL SESSION 'sid,serial#';

ALTER SYSTEM KILL SESSION 'SID, SERIAL#';  

ALTER SYSTEM KILL SESSION '1105,389';  

commit;

No comments:

Post a Comment