How to kill all active and inactive oracle sessions for user

后端 未结 6 1036
北海茫月
北海茫月 2021-01-30 14:30

I am trying the below script to kill all active and inactive oracle sessions for user at once but it doesn\'t work. The script executes successfully but does not kill sessions f

6条回答
  •  忘掉有多难
    2021-01-30 14:53

    Execute this script:

    SELECT 'ALTER SYSTEM KILL SESSION '''||sid||','||serial#||''' IMMEDIATE;' 
    FROM v$session 
    where username='YOUR_USER';
    

    It will printout sqls, which should be executed.

提交回复
热议问题