HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to find current roles available on a database

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
availablehowrolesdatabasecurrentfind

Problem

I am looking to provide grant to one of my function in my database.
However, I am not sure what roles I should give access to.

I searched for it but can't find list of roles for all the users.

Any idea guys as which table I should be looking into.

I am using Oracle 11g.

Thanks in Advance :)

Solution

You can find this information in the DBA_* views in Oracle.

To find all roles in the database:

select * from dba_roles


To find what roles a particular user has:

select * from dba_role_privs where grantee=

Code Snippets

select * from dba_roles
select * from dba_role_privs where grantee=<user name>

Context

StackExchange Database Administrators Q#55180, answer score: 7

Revisions (0)

No revisions yet.