Note
This view is available starting with V2.2.77.
Purpose
Describes the roles granted to other roles. It provides information about the roles that users can access.
Applicability
This view is available only in Oracle mode of OceanBase Database.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| ROLE | VARCHAR2(128) | NO | The name of the role. |
| GRANTED_ROLE | VARCHAR2(128) | NO | The role that is granted. |
| ADMIN_OPTION | VARCHAR2(3) | NO | Indicates whether the ADMIN option is granted to the role. |
Sample query
Query the roles 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