Note
This view is available starting with V4.1.0.
Purpose
This view displays the context information of the views owned by the current user. When accessing a view, the corresponding strategy group is selected based on the context value.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| 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 the views owned by the current user.
obclient [SYS]> SELECT * FROM SYS.USER_POLICY_CONTEXTS;
The query result is as follows:
+--------------+------------+----------------+--------+-----------+
| OBJECT_NAME | NAMESPACE | ATTRIBUTE | COMMON | INHERITED |
+--------------+------------+----------------+--------+-----------+
| V_ORDERS_CTX | DEPT_CTX | CURRENT_DEPT | NO | NO |
| V_ORDERS_CTX | REGION_CTX | CURRENT_REGION | NO | NO |
+--------------+------------+----------------+--------+-----------+
2 rows in set
References
Query the context information of the views accessible to the current user: ALL_POLICY_CONTEXTS
Query the context information of all views in the current tenant: DBA_POLICY_CONTEXTS