views:

66

answers:

2

Help!

I've used impdp and had a typo - now I've got a user name starting with colon (:) - e.g :my_schema.

How can I drop this user? I've tried everything I could think of to escape it, but nothing helps.

Edit: To clarify - I know how to drop a user. I'm having difficulty overcoming the special character issue.

+3  A: 

Did you try enclosing it in double quotes? e.g

drop user ":my_schema";

The case is important when you do this - is it ":myschema" or ":MYSCHEMA" or something in between?

Tony Andrews
tried, doesn't work.
Ran Biron
A: 

You could either use:

drop user :my_schema;

or

drop user :my_schema cascade;

if the user has constraints in other tables then they will not be removed.

drop table x cascade constraints; etc. 

the only problem there is that you loose everything and have to start over. If you database has a script then you just to need to re run the script to reload it in.

Justin Gregoire
I know how to drop a user - I'm having problem with the colon at the start - it's a special char
Ran Biron
@Ran Biron I see, I will keep trying to find a solution to the problem. If i come across anything I will make sure to post it.
Justin Gregoire