create role oracle 12c
-- CREATE ROLE role_name [IDENTIFIED BY password] [NOT IDENTIFIED]
CREATE ROLE role_name;
GRANT CREATE SESSION, ALTER SESSION TO role_name;
GRANT SELECT, INSERT, DELETE, UPDATE ON table_name TO role_name;
GRANT EXECUTE ON proc_name TO role_name;
-- Grant role to user
GRANT role_name TO user_name;
ALTER USER user_name DEFAULT ROLE role_name;
SELECT * FROM DBA_ROLES WHERE ROLE = 'role_name';
SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTED_ROLE = 'role_name'
AND GRANTEE = 'user_name';