Solved

List All Active Users and Associated Roles In Oracle 10gR2

Posted on 2011-03-14
2
672 Views
Last Modified: 2012-08-13
I need to create a query that returns all active Oracle users (Unlocked) and their associated roles.
0
Comment
Question by:AUSA_IT5
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 35129080
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
 
LVL 4

Expert Comment

by:MarioAlcaide
ID: 35129243
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

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

630 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