User Not Able To Drop Even When I killed the session.


SQL> drop user USER_ANAR cascade ;
drop user USER_ANAR cascade
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected

Which is very normal error and the first thing you are trying to check is v$session

SQL> select sid,serial# ,username from v$session where username like '%PRD%';
 SID SERIAL# USERNAME
---------- ---------- ------------------------------
 745 821 USER_ANAR

SQL> alter system kill session '745,821' immediate ;
System altered.

but any problem !!!!

SQL> drop user USER_ANAR ;
drop user USER_ANAR
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected

But there's always solutions :)

SQL> startup force restrict;
ORACLE instance started.
Total System Global Area 7686086656 bytes
Fixed Size 2228032 bytes
Variable Size 1811939520 bytes
Database Buffers 5729419264 bytes
Redo Buffers 142499840 bytes
Database mounted.
Database opened.

SQL> drop user USER_ANAR cascade ;
User dropped.

Problem solved!!!!!!!!!!
Advertisements

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: