3.12 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.
3.12.1 Syntax for Creating a Policy with No Redaction
The None redaction type option can be used to test the internal operation of redaction policies.
The None redaction type has no effect on the query results against tables that have policies defined on them. 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:
-
object_schema
,object_name
,column_name
,policy_name
,expression
,enable
: See General Syntax of the DBMS_REDACT.ADD_POLICY Procedure. -
function_type
: Specifies the function used to set the type of data redaction. EnterDBMS_REDACT.NONE
.If you omit the
function_type
parameter, then the default redactionfunction_type
setting isDBMS_REDACT.FULL
.
3.12.2 Example: Performing No Redaction
The DBMS_REDACT.ADD_POLICY
procedure can create a policy that performs no redaction.
Example 3-11 shows how to create a Data Redaction policy that does not redact any of the displayed values.
Example 3-11 No Redacted Data Redaction 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