Find all users who have a certain role

Finding out a list of all users who posses a particular role is easy when querying against that data dictionary. dba_role_privs, or all_role_privs would give you the answer.

Here’s an example search for all users who have the role of ‘ABC’, ordered by their name.

SELECT * FROM dba_role_privs WHERE granted_role = 'ABC' ORDER BY 1

Leave a Reply