Creating policy groups
In this recipe, you'll create two policy groups that will be applied to table hr.emp_vpd_test
.
Getting ready
To complete this recipe, you'll need an existing user who has appropriate privileges (for example, the user maja
).
How to do it...
Connect to the database as a user who has appropriate privileges (for example, the user
maja
):$ sqlplus maja
Create the first policy group (for example,
pol_grp_A
):SQL> BEGIN DBMS_RLS.CREATE_POLICY_GROUP( object_schema => 'HR', object_name => 'EMP_VPD_TEST', policy_group => 'pol_grp_A'); END; /
Create the second policy group (for example,
pol_grp_B
):SQL> BEGIN DBMS_RLS.CREATE_POLICY_GROUP( object_schema => 'HR', object_name => 'EMP_VPD_TEST', policy_group => 'pol_grp_B'); END; /