dbms_rls.drop_policy : dbms_rls « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL> begin
  2     -- drop the policy first.
  3     dbms_rls.drop_policy (
  4        object_schema     => 'HR',
  5        object_name      => 'EMP',
  6        policy_name      => 'EMP_POLICY'
  7     );
  8
  9     dbms_rls.add_policy (
 10        object_schema     => 'HR',
 11        object_name       => 'EMP',
 12        policy_name       => 'EMP_POLICY',
 13        function_schema   => 'RLSOWNER',
 14        policy_function   => 'AUTHORIZED_EMPS',
 15        statement_types   => 'INSERT, UPDATE, DELETE, SELECT',
 16        update_check      => true,
 17        sec_relevant_cols => 'SAL, COMM'
 18     );
 19  end;
 20  /
begin
*
ERROR at line 1:
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_RLS", line 59
ORA-06512: at line 3








31.22.dbms_rls
31.22.1.Call dbms_rls.add_policy to add policy to a table with statement type, update check and function schema
31.22.2.Add our policy to the EMP view
31.22.3.dbms_rls.drop_policy
31.22.4.dbms_rls.shared_static
31.22.5.dbms_rls.drop_policy and dbms_rls.add_policy