Creating a Policy That Uses No Redaction

You can create policies that use no redaction at all, for when you want to test the policy in a development environment.

Syntax for Creating a Policy with No Redaction

The None redaction type option can be used to test the internal operation of redaction policies.

You can use this option to test the redaction policy definitions before applying them to a production environment. Be aware that LOB columns are not supported.

The DBMS_REDACT.ADD_POLICY fields for creating a policy with no redaction are as follows:

DBMS_REDACT.ADD_POLICY (
   object_schema           IN VARCHAR2 := NULL,
   object_name             IN VARCHAR2,
   column_name             IN VARCHAR2 := NULL,
   policy_name             IN VARCHAR2,
   function_type           IN BINARY_INTEGER := NULL,
   expression              IN VARCHAR2,
   enable                  IN BOOLEAN := TRUE);

In this specification:

Example: Performing No Redaction

The DBMS_REDACT.ADD_POLICY procedure can create a policy that performs no redaction. Performing No Redaction

shows how to create a Data Redaction policy that does not redact any of the displayed values.

BEGIN
 DBMS_REDACT.ADD_POLICY(
   object_schema    => 'mavis',
   object_name      => 'cust_info',
   column_name      => 'user_name',
   policy_name      => 'redact_cust_no_vals',
   function_type    => DBMS_REDACT.NONE,
   expression       => '1=1');
END;
/

Query to get actual data (as data is not redacted) and data output:

SELECT user_name FROM mavis.cust_info;

USER_NAME
----------
IDA NEAU