DEV Community

Pranav Bakare
Pranav Bakare

Posted on • Edited on

DBA_POLICIES in Oracle Database

✅ What’s in DBA_POLICIES?

The DBA_POLICIES view contains all the VPD (Virtual Private Database) policies created using DBMS_RLS.ADD_POLICY.

Each row in this view represents one VPD policy and includes:

Column Name Meaning

OBJECT_SCHEMA   Schema of the table/view the policy is on
OBJECT_NAME Table or view the policy is applied to
POLICY_NAME Name of the VPD policy
FUNCTION_SCHEMA Schema where the policy function is defined
POLICY_FUNCTION Name of the function that returns the predicate
STATEMENT_TYPES Operations the policy applies to (e.g., SELECT, INSERT)
ENABLE  Whether the policy is enabled (YES/NO)

Enter fullscreen mode Exit fullscreen mode

✅ So to answer directly:

✔️ Yes — whatever is listed in DBA_POLICIES are all VPD policies.
✔️ Each one corresponds to a table/view (OBJECT_NAME) and uses a policy function (POLICY_FUNCTION) to enforce row-level access control.


🧪 Example Query to See All Active VPD Policies with Their Functions:

SELECT OBJECT_SCHEMA,
       OBJECT_NAME,
       POLICY_NAME,
       FUNCTION_SCHEMA,
       POLICY_FUNCTION,
       STATEMENT_TYPES,
       ENABLE
FROM DBA_POLICIES
ORDER BY OBJECT_SCHEMA, OBJECT_NAME;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)