nerdexam
Oracle

1Z0-116 · Question #53

A policy predicate function Is associated with an enabled Virtual Private Database (VPD) policy for a table. Which two arguments are passed to the function?

The correct answer is B. the schema owning the table D. the policy name. In Oracle's Virtual Private Database, a policy predicate function must conform to a fixed signature defined by the DBMS_RLS package - it receives two VARCHAR2 arguments: the schema name (owner of the table) and the object name (the table or view itself), and returns a VARCHAR2…

Using Virtual Private Database (VPD)

Question

A policy predicate function Is associated with an enabled Virtual Private Database (VPD) policy for a table. Which two arguments are passed to the function?

Options

  • Athe table name
  • Bthe schema owning the table
  • Cthe policy type
  • Dthe policy name
  • Ethe policy group to which the policy belongs

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    79% (27)
  • C
    12% (4)
  • E
    6% (2)

Explanation

In Oracle's Virtual Private Database, a policy predicate function must conform to a fixed signature defined by the DBMS_RLS package - it receives two VARCHAR2 arguments: the schema name (owner of the table) and the object name (the table or view itself), and returns a VARCHAR2 predicate string appended to SQL WHERE clauses.

Important note: The stated correct answer of B and D appears to conflict with Oracle's official documentation. The actual required arguments to a VPD policy predicate function are B (schema owning the table) and A (the table name) - not D. The canonical function signature is:

FUNCTION my_policy(
    schema_name IN VARCHAR2,   -- B: schema owner
    object_name IN VARCHAR2    -- A: table/view name
) RETURN VARCHAR2;

Why the distractors are wrong:

  • C (policy type) and E (policy group) are attributes defined when registering the policy via DBMS_RLS.ADD_POLICY, but are never passed into the function itself.
  • D (policy name) is also a registration-time attribute - the function has no awareness of which policy invoked it.

Memory tip: Think of the function as asking "Where am I running?" - it gets the where (schema + table) so it can construct context-aware predicates. It does not get metadata about how it was registered (type, name, group).

If your exam source marks this as B+D, treat it with skepticism - verify against Oracle's DBMS_RLS documentation before your exam.

Topics

#VPD policy predicate#policy function parameters#schema name#policy name

Community Discussion

No community discussion yet for this question.

Full 1Z0-116 Practice