Monday, September 19, 2011

Identifying Which Session to Terminate

To identify the system identifier (SID) and serial number of a session, query the V$SESSION dynamic performance view

SELECT SID, SERIAL#, STATUS FROM V$SESSION WHERE USERNAME = 'BILAL';

SID SERIAL# STATUS
----- --------- --------
2 13 ACTIVE
4 23 INACTIVE


A session is ACTIVE when it is making a SQL call to Oracle Database.

ALTER SYSTEM KILL SESSION '4,23';

No comments:

Post a Comment