How to kill inactive sessions logged in more than 15 minutes.

 SELECT ‘alter system kill session (‘ || SID || ‘,’ || SERIAL# || ‘) immediate;’FROM V$SESSION WHERE (USERNAME = ‘WATSON’ AND STATUS = ‘INACTIVE’ and seconds_in_wait > 900);

‘ALTER SYSTEM KILL SESSION(‘||SID||’,’||SERIAL#||’);’                              
——————————————————————————–
alter system kill session (513,2378) immediate;                                              
alter system kill session (613,3053) immediate;                                              
alter system kill session (820,351) immediate;                                              
alter system kill session (843,5830) immediate;                                              
alter system kill session (909,116) immediate;                                              
alter system kill session (952,1333) immediate;                                              

  • October 3, 2015 | 10 views