This error is often encountered when deleting a database user
ORA-01940: cannot drop a user that is currently connected
The reason is that there is a program connecting to the user that we need to delete, so we must disconnect the user before deleting it.
1. Find which connections are running under the account.
SELECT SID,SERIAL# FROM V$SESSION WHERE USERNAME=’USERNAME’；
Note: Capitalization is required here
SQL> SELECT SID,SERIAL# FROM V$SESSION WHERE USERNAME=’SSTEST’;
8 rows selected.
2. Deleting user processes.
SQL>ALTER SYSTEM KILL SESSION ‘137,41813’;
SQL>ALTER SYSTEM KILL SESSION ‘33525993;
3, re-view the user connection and confirm that no connection is in use
SELECT SID,SERIAL# FROM V$SESSION WHERE USERNAME=’SSCRM’;
drop user sstest cascade ；
- ORA-01940: cannot drop a user that is currently connected
- ORA-00054:resource busy and acquire with NOWAIT specified or timeout expired
- ORA-00980 synonym translation is no longer valid
- [Solved] Windows ADB devices port is occupied error: cannot connect to daemon
- The solution of JPS process information unavailable
- ORA-12518 TNSlistener could not hand off client connection [Solved]
- [Solved] Postgres Error: template1 is being accessed by other users
- Activemq Console Error: java.lang.SecurityException: User name [system] or password is invalid.
- Oracle: How to use errorstack to track the ora error of the client
- PING[ARC2]: Heartbeat failed to connect to standby ‘gqtzdb_dg’. Error is 16047