Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

VPD Policy is applied on Policy Function owner!!!

Dev. MusbahDec 9 2015 — edited Jan 4 2016

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)!!!

This post has been answered by Vlad Visan-Oracle on Dec 10 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 1 2016
Added on Dec 9 2015
6 comments
2,006 views