ORA-01940: cannot drop a user that is currently connected ..
SYS@mactlm1> drop user anuj cascade ;
drop user anuj cascade ;
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected
find and kill session ...
set linesize 200 pagesize 200
col kill for a70
select username ,'alter system kill Session ' || ''''||s.sid ||','|| s.serial#||',@'||s.inst_id ||''''||' immediate;' kill from gv$session s
where username = '&USERNAME' ;
Now drop the user
drop user anuj
3 comments:
set linesize 200 pagesize 200
col kill for a70
select 'alter system kill Session ' || ''''||s.sid ||','|| s.serial#||',@'||s.inst_id ||''''||' immediate; ' kill from gv$session s
where username = '&USERNAME' ;
Post a Comment