Solved

No of roles and privs assigned to each role

Posted on 2011-09-20
3
377 Views
Last Modified: 2012-05-12
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
Comment
Question by:nirvairghuman
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 63 total points
ID: 36567619
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
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 62 total points
ID: 36567626
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
 

Author Comment

by:nirvairghuman
ID: 36568313
Thanks a lot Guys,
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question