Note
This view is available starting with V2.2.77.
Purpose
Describes the privileges granted to all objects in the database.
Applicability
This view applies only to OceanBase Database in Oracle mode.
Columns
| Column | Type | Can it be NULL | Description |
|---|---|---|---|
| GRANTEE | VARCHAR2(128) | NO | The username that has the access privilege. |
| OWNER | VARCHAR2(128) | NO | The owner of the object. |
| TABLE_NAME | VARCHAR2(128) | NO | The name of the object. |
| GRANTOR | VARCHAR2(128) | NO | The username that executes the privilege grant. |
| PRIVILEGE | VARCHAR2(40) | NO | The object privilege. |
| GRANTABLE | VARCHAR2(3) | NO | Whether the grantor can grant the privilege through the GRANT OPTION. |
| HIERARCHY | VARCHAR2(10) | NO | Whether the grantor can grant the privilege through the HIERARCHY OPTION. |
Sample query
Query the object privileges granted to the TEST3 user.
obclient [SYS]> SELECT * FROM DBA_TAB_PRIVS WHERE GRANTEE='TEST3';
The query result is as follows:
+---------+-------+------------+---------+-----------+-----------+-----------+
| GRANTEE | OWNER | TABLE_NAME | GRANTOR | PRIVILEGE | GRANTABLE | HIERARCHY |
+---------+-------+------------+---------+-----------+-----------+-----------+
| TEST3 | SYS | TBL3 | SYS | SELECT | NO | NO |
| TEST3 | SYS | TBL3 | SYS | UPDATE | NO | NO |
+---------+-------+------------+---------+-----------+-----------+-----------+
2 rows in set