Note
This view is introduced since OceanBase Database V4.1.0.
Purpose
The ALL_POLICY_CONTEXTS view displays the context based on which the corresponding strategy group takes effect.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| OBJECT_OWNER | VARCHAR2(128) | YES | The owner of the object controlled by the strategy. |
| OBJECT_NAME | VARCHAR2(128) | YES | The name of the object controlled by the strategy. |
| NAMESPACE | VARCHAR2(128) | NO | The name of the associated context. |
| ATTRIBUTE | VARCHAR2(128) | NO | The name of the attribute in the associated context. |
| COMMON | VARCHAR2(3) | NO | This column is used only for compatibility, and the value is fixed to NO. |
| INHERITED | VARCHAR2(3) | NO | This column is used only for compatibility, and the value is fixed to NO. |
Sample query
Query the context information of all view policies.
obclient [SYS]> SELECT * FROM SYS.ALL_POLICY_CONTEXTS;
The query result is as follows:
+--------------+--------------+------------+----------------+--------+-----------+
| OBJECT_OWNER | OBJECT_NAME | NAMESPACE | ATTRIBUTE | COMMON | INHERITED |
+--------------+--------------+------------+----------------+--------+-----------+
| SYS | V_ORDERS_CTX | REGION_CTX | CURRENT_REGION | NO | NO |
| SYS | V_ORDERS_CTX | DEPT_CTX | CURRENT_DEPT | NO | NO |
+--------------+--------------+------------+----------------+--------+-----------+
2 rows in set
References
USER_POLICY_CONTEXTS: view the context information of views owned by the current user.
DBA_POLICY_CONTEXTS: view the context information of all views in the current tenant.