Purpose
Describes the object privileges granted in the database.
Applicability
This view is available starting with OceanBase Database Oracle mode.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| GRANTEE | VARCHAR2(128) | NO | The username of the user who is granted 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 of the user who executes the grant operation. |
| PRIVILEGE | VARCHAR2(40) | NO | The object privilege. |
| GRANTABLE | VARCHAR2(3) | NO | Indicates whether the GRANT OPTION is enabled for granting privileges. |
| HIERARCHY | VARCHAR2(10) | NO | Indicates whether the HIERARCHY OPTION is enabled for granting privileges. |
Sample query
Query the object privileges granted to user TEST3.
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