I am using Oracle 12c with VPD object level policies using user SCOTT. Like below:
object_schema => 'SCOTT'
,object_name => 'CARDS'
,policy_name => 'STRICT'
,function_schema => 'TCTDBS'
,policy_function => 'SV_DB_POLICIES.STRICT_POLICY'
,statement_types => 'SELECT,INSERT,UPDATE,DELETE'
,policy_type => dbms_rls.shared_context_sensitive
,long_predicate => FALSE
,update_check => TRUE
,static_policy => FALSE
,enable => TRUE );
-- Here only Scott user can select,insert,update and delete on cards table under scott schema . Now from another user 'test' , I cannot select this CARDS table , although I give the select permission .
grant select on scott.cards to test ;
SQL > conn test/test
SQL> select count(*) from scott.cards;
My question , How can I able to select scott.cards table from the 'test' user using VPD policies ??
Is there any way to use this policy by a specific user ?