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

No of roles and privs assigned to each role

I need a query to find a no of roles in the database and all privs assigned to each role.
Please help me.
2 Solutions
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
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;
nirvairghumanAuthor Commented:
Thanks a lot Guys,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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