USER_ROLE_PRIVS

2025-11-14 07:33:33  Updated

Note

This view is available starting with V2.2.77.

Purpose

Describes the roles granted to the current user.

Applicability

This view is available only in Oracle mode.

Columns

Column Type Nullable Description
GRANTEE VARCHAR2(30) NO The name of the user, or PUBLIC
GRANTED_ROLE VARCHAR2(30) NO The name of the role granted to the user.
ADMIN_OPTION VARCHAR2(3) NO Indicates whether the ADMIN option was used during the grant.
DEFAULT_ROLE VARCHAR2(3) NO Indicates whether the role is specified as the user's DEFAULT ROLE.

Sample query

Query the roles granted to the current user.

obclient [SYS]> SELECT * FROM USER_ROLE_PRIVS;

The query result is as follows:

+---------+--------------+--------------+--------------+
| GRANTEE | GRANTED_ROLE | ADMIN_OPTION | DEFAULT_ROLE |
+---------+--------------+--------------+--------------+
| SYS     | ROLE1        | YES          | YES          |
| SYS     | ROLE2        | YES          | YES          |
+---------+--------------+--------------+--------------+
2 rows in set

References

DBA_ROLE_PRIVS

Contact Us