Saturday, March 24, 2012

kill all sessions for a user

set head off 
spool tmp.tmp 
select 'Alter system kill session '''||sid||','||serial#||''';' 
from v$session where username='USER_TO_KILL_IN_CAPS' ;
spoof off
@tmp.tmp

No comments:

Post a Comment

How to Trouble shoot Logfile_sync wait event

   First  Identify and break down LGWR wait events. Query wait events for LGWR. In this instance LGWR sid is 3 (and usually it is). select s...