-- List all the roles
select * from dba_roles
order by 1;
--List the granted roles
break on "ROLE" on "PRIVILEGE";
select substr(role,1,20) "ROLE",
substr(privilege,1,30) "PRIVILEGE",
ADMin_option
from role_sys_privs
order by 1 asc, 2 asc;
--Individual roles
break on "USER" on "ROLE";
select substr(GRANTEE,1,10) "USER",
substr(GRANTED_ROLE,1,20) "ROLE",
substr(ADMIN_OPTION,1,3) "ADM"
from dba_role_privs
order by 1,2;
select * from dba_roles
order by 1;
--List the granted roles
break on "ROLE" on "PRIVILEGE";
select substr(role,1,20) "ROLE",
substr(privilege,1,30) "PRIVILEGE",
ADMin_option
from role_sys_privs
order by 1 asc, 2 asc;
--Individual roles
break on "USER" on "ROLE";
select substr(GRANTEE,1,10) "USER",
substr(GRANTED_ROLE,1,20) "ROLE",
substr(ADMIN_OPTION,1,3) "ADM"
from dba_role_privs
order by 1,2;
Tags:
Oracle