Note
This view is available starting with V2.2.77.
Purpose
This view describes the roles that are granted to other roles. It provides information about the roles that users can access.
Applicability
This view is applicable only to OceanBase Database in Oracle mode.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| ROLE | VARCHAR2(128) | NO | The name of the role. |
| GRANTED_ROLE | VARCHAR2(128) | NO | The name of the role that is granted to the role. |
| ADMIN_OPTION | VARCHAR2(3) | NO | Indicates whether the ADMIN option is granted to the role. |
Sample query
Query the roles that are granted to the role ROLE1 that the current user can access.
obclient [SYS]> SELECT * FROM ROLE_ROLE_PRIVS WHERE ROLE = 'ROLE1';
The query result is as follows:
+-------+--------------+--------------+
| ROLE | GRANTED_ROLE | ADMIN_OPTION |
+-------+--------------+--------------+
| ROLE1 | ROLE2 | NO |
+-------+--------------+--------------+
1 row in set
