• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

No of roles and privs assigned to each role

Hi,
I need a query to find a no of roles in the database and all privs assigned to each role.
Please help me.
0
nirvairghuman
Asked:
nirvairghuman
2 Solutions
 
sdstuberCommented:
select count(*) from dba_roles;  -- count of all roles


select r.role,count(p.privilege) from dba_roles r, dba_sys_privs p    -- count of privileges for each role
where r.role = p.grantee
group by r.role
0
 
slightwv (䄆 Netminder) Commented:
I might have missed a view or two but here are the core ones:

select role from dba_roles;

select role, granted_role from role_role_privs;
select role, privilege from role_sys_privs;
select role, table_name, column_name, privilege from role_tab_privs;
0
 
nirvairghumanAuthor Commented:
Thanks a lot Guys,
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now