Solved

List All Active Users and Associated Roles In Oracle 10gR2

Posted on 2011-03-14
2
665 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
2 Comments
 
LVL 76

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
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.  …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

785 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