You created an application context successfully. The user OE was granted the EXECUTE
privilege on the DBMS_SESSION package. The user receives this error while setting the value
for an attribute within the context:
SQL> EXECUTE
DBMS_SESSION.SET_CONTEXT(‘SALES_ORDERS_CTX’,’ACCOUNT_MGR’,’OE’);
BEGIN DBMS_SESSION.SET_CONTEXT(‘SALES_ORDERS_CTX’,’ACCOUNT_MGR’,’OE’);
END;
*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at “SYS.DBMS_SESSION”, line 94
ORA-06512: at line 1
What is the reason for this error?
A.
The context was created with a package name in the USING clause.
B.
The attribute can be set only in the package associated with the context.
C.
The package associated with the context did not exist at the time of creation of the context.
D.
The value for an attribute of a user-defined context can be set only by the ALTER SESSION
command.
http://docs.oracle.com/cd/B19306_01/network.102/b14266/apdvcntx.htm#i1006133
B is a correct answer
A , B
OPS , A IS MANDATORY
CREATE OR REPLACE CONTEXT PIEROCONTEXT;
ORA-02012: parola chiave USING mancante
The question is for “set the application context parameter value”, not for “create one applicaton context”. Notes the application context is owned by the SYSTEM even though one ORAUSER creates one application context.
B
SET_CONTEXT Procedure. Usage Notes
This procedure must be invoked directly or indirectly by the trusted package
http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_sessio.htm#i1010942
Using Secure Session-Based Application Context
Task 1: Create a PL/SQL Package that Sets the Secure Context for Your Application
http://docs.oracle.com/cd/B19306_01/network.102/b14266/apdvcntx.htm#CHDBDJGC