Saltar al contenido

Dropping connected users in Oracle database

10/28/2020
Dropping connected users in Oracle database

Cuando quieras eliminar algunos usuarios en Oracle DB usando sqlplus y obtienes este error:

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

La solucion es la siguiente:

login as sysdaba:

sqlplus  / as sysdba

Entonces:

sql>Shutdown immediate;

sql>startup restrict;

sql>drop user TEST cascade;

Si desea reactivar DB normalmente reinicie el servidor:

sql>Shutdown immediate;

sql>startup;

Bye.