What could be the reason for the error?

You created the SALES_ORDERS_CTX context to use the
OE.SALES_ORDERS_PKG package.
View Exhibit1 and examine the package that is used with the context.
View Exhibit2 to examine the policy defined and the logon trigger.

A user receives the following error when he or she executes a query:
ERROR at line 2:
ORA-28112: failed to execute policy function

What could be the reason for the error?

You created the SALES_ORDERS_CTX context to use the
OE.SALES_ORDERS_PKG package.
View Exhibit1 and examine the package that is used with the context.
View Exhibit2 to examine the policy defined and the logon trigger.

A user receives the following error when he or she executes a query:
ERROR at line 2:
ORA-28112: failed to execute policy function

What could be the reason for the error?

A.
The user has insufficient privileges on the DBMS_SESSION package.

B.
The subprograms inside the package have not been created with the invoker’s right.

C.
The THE_PREDICATE function has an insufficient number of parameters in the package.

D.
The policy is created by using SALES_ORDERS_PKG.THE_PREDICATE without a
parameter.



Leave a Reply 3

Your email address will not be published. Required fields are marked *


morriarti

morriarti

http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_rls.htm#ARPLS67724
“The policy functions are called by the server. Following is the interface for the function:

FUNCTION policy_function (object_schema IN VARCHAR2, object_name VARCHAR2)
RETURN VARCHAR2
— object_schema is the schema owning the table or view.
— object_name is the name of table, view, or synonym to which the policy applies. “

Roscoe

Roscoe

It’s C.
I agree. Policy isn’t actually created by THE_PREDICATE function, instead THE_PREDICATE function is used to create a predicate for the policy. The policy itself is created by means of DBMS_RLS package.