ORA-01940: cannot drop a user that is currently connected

ORA-01940: cannot drop a user that is currently connected:

Whenever you get an error like this, just use the below query:

SQL> select sid, serial# from v$session where username = ‘USER’;

SID SERIAL#
———- ———-
1826 56756

SQL> alter system kill session ‘1826,56756’;

System altered.

SQL> drop user USER cascade;

User dropped.

Nagulu Polagani

"We are all apprentices in a craft where no one ever becomes a master."