In oracle, creating role has its own importance rather than privileges because role helps to reduce repetition of granting privileges for different users
I am being requested by multiple users for access for one of the database and i need to find a way to grant access using role
To create role
SQL> create role my_role; Role created.
To grant privileges to role
SQL> grant create table,create view,create procedure to my_role; Grant succeeded.
To grant the role to user
SQL> grant my_role to test; Grant succeeded.
Test the role by using the privilege
SQL> conn test Enter password: Connected. SQL> SQL> create table t(name varchar2(10),num number(10)); Table created.
You can also create a role with password
SQL> create role your_role identified by password; Role created.