You have an OE_ACCESS_ORDERS_POLICY security policy implemented on the ORDERS
table in the OE schema. The user sessions are able to access only the desired rows. The
database administrator (DBA) uses the following command:
SQL> EXECUTE
DBMS_RLS.ENABLE_POLICY(‘OE’,’ORDERS’,’OE_ORDERS_ACCESS_POLICY’,FALSE);
Which statement is true about user sessions that are connected currently?
A.
The security policy remains in effect till the end of the current session.
B.
The subsequent queries on the ORDERS table produce an ORA-01031: insufficient privileges
error.
C.
The subsequent queries on the ORDERS table within the current session are not controlled by
the security policy.
D.
The subsequent queries on the ORDERS table produce an ORA-28112: failed to execute
policy function error.
C.
http://docs.oracle.com/database/121/ARPLS/d_rls.htm#ARPLS67742
http://docs.oracle.com/database/121/DBSEG/vpd.htm#DBSEG14001
“The DYNAMIC policy type runs the policy function each time a user accesses the Virtual Private Database-protected database objects.
If you do not specify a policy type in the DBMS_RLS.ADD_POLICY procedure, then, by default, your policy will be dynamic. You can specifically configure a policy to be dynamic by setting the policy_type parameter of the DBMS_RLS.ADD_POLICY procedure to DYNAMIC.”
A
HY GUYS why C?
i thought A was the correct answer
why within current session has no affect the policy enabled ?
what’s the parameter fourth set to false ?
thanks
OK, but it’s very difficult learn all parametrs…
why Oracl didn’t prepare a DBMS_RLS.DISABLE_POLICY ?????????????????
http://www.toadworld.com/platforms/oracle/w/wiki/3180.dbms-rls-enable-policy
DBMS_RLS.ENABLE_POLICY
This procedure enables or disables a fine-grained access control policy. A policy is enabled when it is created.
The procedure causes the current transaction, if any, to commit before the operation is carried out. However, this does not cause a commit first if it is inside a DDL event trigger.
A commit is also performed at the end of the operation.
Syntax
DBMS_RLS.ENABLE_POLICY (
object_schema IN VARCHAR2 := NULL,
object_name IN VARCHAR2,
policy_name IN VARCHAR2,
enable IN BOOLEAN);
Parameters Description
object_schema Schema containing the table or view (logon user if NULL).
object_name Name of table or view that the policy is associated with.
policy_name Name of policy to be enabled or disabled.
Enable TRUE to enable the policy, FALSE to disable the policy.
C
http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_rls.htm#i998317
DBMS_RLS.ENABLE_POLICY(‘OE’,’ORDERS’,’OE_ORDERS_ACCESS_POLICY’,FALSE); — FALSE mean disable the security policy even though the subprogram name is ENABLE_POLICY
C.
ENABLE_POLICY Procedure
enable: TRUE to enable the policy, FALSE to disable the policy
This procedure enables or disables a fine-grained access control policy. A policy is enabled when it is created.
http://docs.oracle.com/database/121/ARPLS/d_rls.htm#ARPLS67740
REFRESH_GROUPED_POLICY Procedure
This procedure reparses the SQL statements associated with a refreshed policy.
docs.oracle.com/database/121/ARPLS/d_rls.htm#ARPLS67742