Hi All,
I've run this code:
BEGIN
DBMS_RLS.ADD_POLICY (
object_schema => 'MYS',
object_name => 'MY_TAB',
policy_name => 'SELECT_LEVEL_POL',
function_schema => 'MYS',
policy_function => 'DATA_LEVEL',
statement_types => 'SELECT,INDEX'
);
END;
/
As I know when I apply some policy function on some table (using VPD) this function does not apply on its owner for that table (no predicate returned for its owner), but what happened is the opposite when I select form the table MY_TAB from its creator which is the creator for the policy function it returned rows depending on the predicate returned from the policy function!!!! (I tried with another user and the policy function did the same and this what I want not the creator)
Why? and how to solve?
Note: I'm using Oracle DB 11g R2
I did this previously with another table and another policy function with the same scenario but the creator select returned all the rows (no predicate is applied)!!!