How to kill not active sessions from database?
How to kill not active sessions from database?
best reagrds
Magdy Mohanna
IT Manager
Hi,
Retrieve the sid and serial# from v$session for the inactive session and run below command
alter system kill session 'sid,serial#';
Thanks,
Ravi
Hi ,
SELECT SID, SERIAL#, STATUS,USERNAME,PROGRAM FROM V$SESSION WHERE status='INACTIVE'
ALTER SYSTEM KILL SESSION '<SID>,<SERIAL#>';
Where SID and serial# value you would get from above
When an inactive session has been terminated, the STATUS
of the session in the V$SESSION
view is KILLED
.
Regards
Dear Magdy IT Manager,
now you know how to kill "not active sessions"... But think 7 times before doing it.