Kill Multiple sessions

If have 50 inactive session and i want to to kill all session at once
tell me the procedure to kill all 50 session at once

Questions by gyanudba   answers by gyanudba

Showing Answers 1 - 3 of 3 Answers

muthu5047

  • Sep 3rd, 2011
 

in our project to kill all the inactive session we use the following script..
run the sql script given below it will give u all inactive sessions sid and serial no and redirect output to (inactive_kill.sql)file.
@inactive_kill.sql will kill inactive sessions.

sql script

SELECT 'ALTER SYSTEM KILL SESSION '||''''||sid ||','|| serial#||''''||' immediate;'
FROM v$session
WHERE status ='INACTIVE';

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions