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

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.