Ask the Expert

Command to add and remove users in Oracle

What command is used to add and remove users to the database? How do you archive a user?

    Requires Free Membership to View

To add a user, use the CREATE USER command.

To remove a user, use the DROP USER command.

There is no ARCHIVE USER command. Instead, you'll want to use Oracle's export utility to generate a dump of all objects the user owns. This is done on the database server with the following command:

exp userid=system/manager file=my_user.dmp owner=my_user
The above signs on to the database with the SYSTEM user. The dump file will contain all objects owned by MY_USER.

This was first published in May 2007

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: