Oracle Database/Administering Users

From Wikibooks, open books for an open world
Jump to: navigation, search

Within Oracle, users may be managed through the webpage under the administration section, and within the Database Users subsection.

Creating and managing database user accounts[edit]

Adding users[edit]

New users can be created by an administrator or a user who has a "CREATE USER" privilege using Oracle Enterprise Manager GUI by clicking on the "Create" link in the "Users" section . Enter the username and password for the new user. You can also set the password to expire (where the user must change the password on the next login), and whether an account is locked (to prevent a user from connecting to the system).

In most cases, users should belong to the Connect role. If the user needs to create tables or have more advanced capability, the user should be placed within the Resource role. Database admins should appear in the DBA role. If desired, users may be given individual permissions within Directly Grant Privileges section.

Alternatively, users can also be created using the "CREATE USER" SQL command.

Eg: CREATE USER test IDENTIFIED BY 'naveen123' DEFAULT TABLESPACE USER_DATA PASSWORD EXPIRE QUOTA UNLIMITED ON USER_DATA;

After creating the user CONNECT role needs to be granted for the user to connect to the database.

Eg: GRANT CONNECT TO test;

Removing users[edit]

When a user no longer needs to be present within the database, you click the drop button within the web interface.

Creating and managing roles[edit]

Granting and revoking privileges[edit]

Controlling resource usage by users[edit]