No Redaction Policy in Oracle Redaction

No Redaction Policy in Oracle Redaction

No Redaction policy is designed for test the environment before applying on the production environment, it does not effect result of the query.

Syntax

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);

Parameter
Function type defines as DBMS_REDACT.NONE value.

Example
It does not redact any value during query operation.


BEGIN
DBMS_REDACT.ADD_POLICY(
object_schema => 'hr',
object_name => 'employees',
column_name => 'password',
policy_name => 'redact_emp_password',
function_type => DBMS_REDACT.NONE,
expression => '1=1');
END;
/

SELECT password FROM hr.employees;
PASSWORD
———-
adeftge#12

nullify redact in Oracle Redaction

Use Null Value as redact value in return of Query result:

Example

BEGIN
DBMS_REDACT.add_policy(
object_schema => 'HR',
object_name => 'employees',
column_name => 'salary',
policy_name => 'redact_emp_sal',
function_type => DBMS_REDACT.nullify,
expression => '1=1'
);

Select Salary from hr.employees;
Salary
------

 

Advertisements

One thought on “No Redaction Policy in Oracle Redaction

  1. Pingback: Oracle Redaction | Smart way of Technology

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s