oracle create role

Solutions on MaxInterview for oracle create role by the best coders in the world

showing results for - "oracle create role"
Carolina
11 Oct 2019
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';