List All Active Users and Associated Roles In Oracle 10gR2

I need to create a query that returns all active Oracle users (Unlocked) and their associated roles.
AUSA_IT5Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
Users and status can be found in dba_users.

Assigned roles in dba_role_privs.

You also realize there can be individual privs assigned?  Not just roles.
0
 
MarioAlcaideCommented:
SELECT DBA_ROLE_PRIVS.GRANTEE,DBA_ROLE_PRIVS.GRANTED_ROLE
FROM DBA_ROLE_PRIVS,DBA_USERS
WHERE DBA_ROLE_PRIVS.GRANTEE = DBA_USERS.USERNAME
AND DBA_USERS.ACCOUNT_STATUS = 'OPEN'
ORDER BY GRANTEE;
0
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.

All Courses

From novice to tech pro — start learning today.