SQL> begin
2 dbms_rls.drop_policy (
3 object_schema => 'HR',
4 object_name => 'DEPT',
5 policy_name => 'EMP_DEPT_POLICY'
6 );
7 dbms_rls.add_policy (
8 object_schema => 'HR',
9 object_name => 'DEPT',
10 policy_name => 'EMP_DEPT_POLICY',
11 function_schema => 'RLSOWNER',
12 policy_function => 'AUTHORIZED_EMPS',
13 statement_types => 'SELECT, INSERT, UPDATE, DELETE',
14 update_check => true,
15 policy_type => dbms_rls.shared_static
16 );
17 dbms_rls.add_policy (
18 object_schema => 'HR',
19 object_name => 'EMP',
20 policy_name => 'EMP_DEPT_POLICY',
21 function_schema => 'RLSOWNER',
22 policy_function => 'AUTHORIZED_EMPS',
23 statement_types => 'SELECT, INSERT, UPDATE, DELETE',
24 update_check => true,
25 policy_type => dbms_rls.shared_static
26 );
27 end;
28 /
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 2
|