1GRANT role_name TO user_name;
2ALTER USER user_name DEFAULT ROLE role_name;
3-- Check:
4SELECT * FROM DBA_ROLES WHERE ROLE = 'role_name';
5SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTED_ROLE = 'role_name'
6 AND GRANTEE = 'user_name';
1-- CREATE ROLE role_name [IDENTIFIED BY password] [NOT IDENTIFIED]
2CREATE ROLE role_name;
3GRANT CREATE SESSION, ALTER SESSION TO role_name;
4GRANT SELECT, INSERT, DELETE, UPDATE ON table_name TO role_name;
5GRANT EXECUTE ON proc_name TO role_name;
6-- Grant role to user
7GRANT role_name TO user_name;
8ALTER USER user_name DEFAULT ROLE role_name;
9SELECT * FROM DBA_ROLES WHERE ROLE = 'role_name';
10SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTED_ROLE = 'role_name'
11 AND GRANTEE = 'user_name';