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
Saturday, March 12, 2016
How to kill all sessions for a given user in oracle
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
Subscribe to:
Posts (Atom)
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...
-
Refference with the document How to Clean Up Duplicate Objects Owned by SYS and SYSTEM Schema [ID 1030426.6] Hi Had faced an issue where ...
-
Login to the first node column is_recovery_dest_file format a25 column name format a60 set linesize 160 select status, name, is_recover...
-
SQL> SELECT LOG_MODE FROM SYS.V$DATABASE; LOG_MODE ------------ NOARCHIVELOG show parameter archive will tell u the archive...