Before dropping a user, it is recommended to first Lock the user.
Here below is the SQL statement to drop a user:
SQL> drop user <user>;
If user owns database objects the above command will not work and use CASCADE clause for users that have database objects.
SQL> drop user <user> CASCADE
Example:
SQL> conn sys/orcl@to_primary as sysdba Connected. SQL> drop user mereba; drop user mereba * ERROR at line 1: ORA-01922: CASCADE must be specified to drop 'MEREBA' SQL> drop user mereba cascade; User dropped. SQL>
meda Edited answer 22/02/2022