This content has been marked as final. Show 5 replies
try Column masking
Status Level: Newbie
Registered: Aug 13, 2007
Total Posts: 974
Total Questions: 423 (362 unresolved)
Mostly question STILL open Please close it if you feel you have the answer and keep the Oracle forum clean.
Thanks for your help.
in attached example
Create the policy function to restrict access to SAL and COMM columns
-- if the employee is not part of the department 20.
CREATE OR REPLACE FUNCTION pf_job (oowner IN VARCHAR2, ojname IN VARCHAR2)
RETURN VARCHAR2 AS
con VARCHAR2 (200);
con := 'deptno = 20';
my requirement as employee only see itself SAL at employee table.
so in pf_job function
i need to remove it deptno = 20 as con:=''
Thanks for help!
i get eoor for column security.
CREATE OR REPLACE FUNCTION auth_users(
schema_var IN VARCHAR2,
table_var IN VARCHAR2
return_val VARCHAR2 (400);
select user into v_user from dual;
return_val := 'USER_ID = '||v_user ;
object_schema => 'TEST',
object_name => 'USERS',
policy_name => 'hide_policy',
policy_function => 'auth_users',
sec_relevant_cols =>' SALARY',
sec_relevant_cols_opt => dbms_rls.ALL_ROWS);
in test person account test2 in sqlplus
SQL> select *from users;
select *from users
ERROR at line 1:
ORA-28113: policy predicate has error
it said that we need to grant the security schema select access on the table.
auth_users function and policy in sys schema user table in test schema.
how to grant the sys schema select access on the test schema user table?
Thanks in advance!
I fixed this issue.