While dropping a user in oracle database , you may face below error. ORA-01940


SQL> drop user SCOTT cascade
2 /
drop user SCOTT cascade
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected


1. Find the sessions running from this userid:

2. Kill the sessions:

3. Now the drop the user: