Create Oracle User: Grant Permissions Guide

To create a user and assign permissions in the Oracle database, follow these steps:

  1. Log in to the Oracle database using the sys user.
  2. Execute the following SQL statement to create a new user:
CREATE USER new_user IDENTIFIED BY password;

new_user is the username to be created, and password is the user’s password.

  1. Grant the permission required for new users. For example, if you want to grant a new user SELECT permission on a table, you can execute the following SQL statement:
GRANT SELECT ON table_name TO new_user;

The table_name is the name of the table to be granted permission to.

  1. If additional permissions need to be assigned to new users, you can continue to use the GRANT statement to grant other permissions.
  2. Finally, use the COMMIT statement to save the changes and exit the database.
COMMIT;

By following the above steps, you can successfully create a user and assign permissions in the Oracle database.

bannerAds