Purpose
This view describes roles that are granted to other roles. It provides information about roles that users can access.
Applicability
This view is available starting with 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 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