ROLE_SYS_PRIVS

2026-04-02 06:23:58  Updated

Note

This view is available starting with V2.2.77.

Purpose

Describes the system privileges granted to a role.

Applicability

This view is applicable only to OceanBase Database in Oracle-compatible mode.

Columns

Column Type Nullable Description
ROLE VARCHAR2(128) NO The name of the role.
PRIVILEGE VARCHAR2(40) NO The system privilege granted to the role.
ADMIN_OPTION VARCHAR2(3) NO Indicates whether the ADMIN option is granted to the role.

Sample query

Query the system privileges granted to the ROLE2 role.

obclient [SYS]> SELECT * FROM ROLE_SYS_PRIVS WHERE ROLE = 'ROLE2';

The query result is as follows:

+-------+-----------------+--------------+
| ROLE  | PRIVILEGE       | ADMIN_OPTION |
+-------+-----------------+--------------+
| ROLE2 | CREATE SEQUENCE | NO           |
+-------+-----------------+--------------+
1 row in set

Contact Us