2 Day DBA > Managing Users and Security > Managing Database Users > Dropping Users
Dropping Users |
Previous |
Next |
Dropping a user removes the user from the database. Before you can drop a user, you must first drop all the user's schema objects. Or, you can use the cascade feature of the drop operation, which simultaneously drops a user and all his schema objects. The following are two alternatives to dropping a user and losing all the user's schema objects:
To temporarily deny access to the database for a particular user while preserving the user's schema objects, you can lock the user account. See "Locking and Unlocking User Accounts" for more information.
To drop a user but retain the data from the user's tables, export the tables first. See "Importing, Exporting, Loading, and Unloading Data" for instructions.
Caution: Under no circumstances should you attempt to drop theSYS or SYSTEM users, or any other internal user accounts. Doing so could cause Oracle Database XE to malfunction.
|
Suppose Nick's project is canceled and Nick takes a position in another department. You want to drop the user NICK
and all associated schema objects.
To drop user NICK
and all his owned schema objects:
View the Manage Database Users page that contains the icon or link for NICK
.
See "Viewing Users" for instructions.
Click the NICK icon or link.
The User page appears, with account information for user NICK
displayed.
Click Drop.
The Confirm Drop User page appears.
Select the Cascade check box.
This indicates that you want to drop the user's schema objects also. If the user has schema objects and you do not select this option, you receive an error message if you attempt to complete the drop operation.
Click Drop User.
A confirmation message is displayed.