Solved

No of roles and privs assigned to each role

Posted on 2011-09-20
3
374 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 73

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 76

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now