How to solve if you get SQL error “ORA-00921” while dropping an existing user in Oracle 12c.
I got one user existing on my database called “SLOBA”. Now let us try to drop it.
drop user SLOBA cascase ;
Output as error:
Error starting at line : 4 in command - drop user SLOBA cascase Error report - SQL Error: ORA-00921: unexpected end of SQL command 00921. 00000 - "unexpected end of SQL command" *Cause: *Action: Error starting at line : 4 in command - drop user SLOBA Error report - SQL Error: ORA-28014: cannot drop administrative users 28014. 00000 - "cannot drop administrative users" *Cause: An attempt was made to drop administrative users. Administrative users can be dropped only by SYS during migration mode. *Action: Try dropping administrative users during migration mode.
Now alter the system session “_oracle_script” to true.
alter session set "_oracle_script"=true;
Now let us try to drop the user again.
drop user SLOBA cascade; User SLOBA dropped.