Create Oracle User: Grant Permissions Guide
To create a user and assign permissions in the Oracle database, follow these steps:
- Log in to the Oracle database using the sys user.
- 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.
- 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.
- If additional permissions need to be assigned to new users, you can continue to use the GRANT statement to grant other permissions.
- 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.