You can probably guess that you can get information about roles from Oracle's data dictionary views, because these views are the source of all knowledge about the objects within the database.
To use this view to discover the object privileges granted by a role, use the name of the role as a selection condition for the
GRANTOR
column. The
DBA_TAB_PRIVS
view is located in the
SYS
schema, so most users will have to include the qualified table identifier,
SYS.DBA_TAB_PRIVS
, to select from the table.
Two other views that can be used in investigating roles:
- The
ROLE_ROLE_PRIVS
view lists the roles granted to a role, so you can investigate a hierarchy of roles.
- The
DBA_ROLES
table lists whether a password is required for a role