In order to drop a user, you must have the Oracle DROP USER system privilege. The command line syntax for dropping a user can be seen below:
DROP USER scott CASCADE;
If a user owns any database objects, that user can only be dropped with the Oracle DROP USER CASCADE command. The Oracle DROP USER CASCADE command drops a user and all owned objects.
The user will not be dropped and an error message will be returned if you a user own objects and you fail to use the Oracle DROP USER CASCADE command.
As the DROP USER CASCADE command is a DDL command, after the Oracle DROP USER CASCADE command has been executed, a rollback to re-create the user and his objects cannot be completed.
No comments:
Post a Comment