How to create a Redact Policy in oracle

333 Views Asked by At

I am trying to create a redact policy to hide NIC from Customer table for all users.

BEGIN
 DBMS_REDACT.ADD_POLICY (
   object_schema       => 'RETAILX',
   object_name         => 'CUSTOMER',
   column_name         => 'NIC',
   policy_name         => 'REDACT_NIC_POLICY',
   function_type       => DBMS_REDACT.PARTIAL,
   function_parameters => 'MDy1',
expression             => '1=1'
 );
END;

Above is my code for the policy creation. However, I am getting an error while creating the policy. Error as below.

ORA-06550: line 7, column 27: PLS-00201: identifier 'DBMS_REDACT' must be declared ORA-06550: line 2, column 2: PL/SQL: Statement ignored 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action:

What Could be wrong here?

0

There are 0 best solutions below