Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drop user; drop objects

Status
Not open for further replies.

blom0344

Technical User
Mar 20, 2002
3,441
NL
[Trying to switch from DB2 to Oracle 9i:]
If I drop a user-account from a database, will that automatically result in a cascading effect where all objects that are owned by this account are dropped as a result?

(Which is - in any case - desirable in my situation)

Ties Blom

 
Verwelkoom naar de Wereld van Oracle, nieuwe vriend ! Mag de tijd u bent hier wees de moeite lonend.

Actually, if you attempt to drop (with a standard "DROP USER..." command) an Oracle user that owns objects, you receive this reaction from Oracle:
Code:
DROP USER <username>;
*
ERROR at line 1:
ORA-01922: CASCADE must be specified to drop '<username>'
So, if you wish to remove the user and all of its objects, you can do as the error message suggests:
Code:
DROP USER <username> [b]cascade[/b];
Let us know if this resolves your need/question.



[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
 
Ties,

After you quit laughing at my laughable Dutch, I meant to say, "May the time you are here be worthwhile." (I fear I did not even come close earlier.)[blush]

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
 
Actually I did not laugh, I sort of smiled :)

And yes, that was exactly the answer to my question.

Still makes me wonder how you managed to come up with an dutch sentence that conveyed the message, almost getting syntax right. Some say even Chinese is easier than dutch - which is not true though -

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top