Home » RDBMS Server » Security » Doubt in DBMS_RLS!
Doubt in DBMS_RLS! [message #504893] Thu, 28 April 2011 06:59 Go to previous message
ramya29p
Messages: 146
Registered: November 2007
Location: Chennai
Senior Member
Hi ,
I have tried to implement RLS policy of oracle.
I have two Schema X1 & X1_DBA.

I have created the emp table in X1_DBA
create table emp(empid number,ename varchar2(10),deptno number)

and inserted some rows into the Table. i have created the below function in X1_DBA schema & Given Select Privilege to X1.
CREATE OR REPLACE FUNCTION no_dept10(
      p_schema  IN VARCHAR2,
      p_object  IN VARCHAR2)
      RETURN VARCHAR2
    AS
    BEGIN
      RETURN 'deptno != 10';
    END;

Grant select on emp to X1;

When i Add the Policy in X1_DBA.schema i am getting the Error as Table does not exist
SQL> BEGIN
  2        DBMS_RLS.add_policy
  3           (object_schema    => 'X1',
  4            object_name      => 'EMP',
  5            policy_name      => 'quickstart',
  6            policy_function  => 'no_dept10');
  7      END;
  8  /

BEGIN
      DBMS_RLS.add_policy
         (object_schema    => 'X1',
          object_name      => 'EMP',
          policy_name      => 'quickstart',
          policy_function  => 'no_dept10');
    END;

ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_RLS", line 20
ORA-06512: at line 2

Could any one please tell me why i am Getting the Error?


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Oracle Label Security - Insert Operation
Next Topic: how to implement row level and column level vpd simultaneously
Goto Forum:
  


Current Time: Fri Apr 26 09:05:51 CDT 2024