SQL Error: ORA-00921 in Oracle 12c

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;

Output :

Session altered. 

Now let us try to drop the user again.


drop user SLOBA cascade;
User SLOBA dropped.

Advertisements

One thought on “SQL Error: ORA-00921 in Oracle 12c

  1. Good one bro..

    Thanks & Best Regards, *Suryakanth Gunti* Mobile# : *+91 99029 33733/98491 43733.*

    On Thu, Feb 9, 2017 at 11:21 PM, Swadhin Ray’s (Sloba) Blog wrote:

    > slobaexpert posted: “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. Output as error: > Now alter the syst” >

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s