Note
This view is available starting with V2.2.77.
Purpose
This view displays all roles in the current tenant.
Applicability
This view is available starting with OceanBase Database.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| ROLE | VARCHAR2(30) | NO | The name of the role. |
| PASSWORD_REQUIRED | VARCHAR2(8) | NO | Indicates whether the role requires a password. Currently, the role password feature is supported, but this field cannot correctly display the password requirement. |
| AUTHENTICATION_TYPE | VARCHAR2(11) | NO | Indicates the authentication mechanism for the role. This field is not supported at present. |
Sample query
Query all roles in the current tenant.
obclient> SELECT * FROM SYS.DBA_ROLES;
The query result is as follows:
+---------------------+-------------------+---------------------+
| ROLE | PASSWORD_REQUIRED | AUTHENTICATION_TYPE |
+---------------------+-------------------+---------------------+
| CONNECT | NO | NONE |
| RESOURCE | NO | NONE |
| DBA | NO | NONE |
| PUBLIC | NO | NONE |
| STANDBY_REPLICATION | NO | NONE |
| ROLE1 | NO | NONE |
+---------------------+-------------------+---------------------+
6 rows in set