Note
This view is available starting with V4.1.0.
Purpose
This view displays the context information of views that the current user can access. When accessing a view, the corresponding strategy group is selected based on the value of the context.
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 associated context name. |
| ATTRIBUTE | VARCHAR2(128) | NO | The attribute name in the associated context. |
| COMMON | VARCHAR2(3) | NO | Reserved for compatibility. The value is fixed to NO. |
| INHERITED | VARCHAR2(3) | NO | Reserved for compatibility. The value is fixed to NO. |
Sample query
Query the context information of all view strategy groups.
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
Query the context information of views owned by the current user: USER_POLICY_CONTEXTS
Query the context information of all views in the current tenant: DBA_POLICY_CONTEXTS