kill session


SQL> drop user xxxxx cascade;
drop user xxxxx cascade
*
ERROR at line 1:ORA-01940: cannot drop a user that is currently connected
SQL> select sid, serial# from v$session where username = 'xxxxx'; 
SID SERIAL#
----- ------------ 
268 1268 
315 1223

SQL> Alter user xxxxx account lock;
SQL> alter system kill session '268,1268';
System altered.

SQL> alter system kill session '315,1223';
System altered.

SQL> drop user xxxxx cascade;
User dropped.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: