2.8 Comparison of Full, Partial, Regexp, Random, and Nullify Redaction Based on Data Types
The full, partial, regular expression, random, and nullify data redaction styles affect the Oracle built-in, ANSI, user-defined, and Oracle supplied types in different ways.
2.8.1 Oracle Built-in Data Types Redaction Capabilities
Oracle Data Redaction handles the Oracle built-in data types depending on the type of Data Redaction policies that are used.
Table 2-1 describes the Oracle Data Redaction support for Oracle built-in data types.
Table 2-1 Redaction Support for Oracle Built-in Data Types
Column Data Type | Full Redaction | Partial Redaction | Regexp Redaction | Random Redaction | Nullify Redaction |
---|---|---|---|---|---|
|
No |
No |
No |
No |
No |
BINARY_DOUBLE |
Yes |
Yes |
No |
Yes |
Yes |
BINARY_FLOAT |
Yes |
Yes |
No |
Yes |
Yes |
|
Yes |
No |
No |
No |
Yes |
|
Yes |
No |
No |
Yes |
Yes |
CHAR |
Yes |
Yes |
Yes |
Yes |
Yes |
|
Yes |
No |
Yes |
No |
Yes |
DATE |
Yes |
Yes |
No |
Yes |
Yes |
FLOAT |
Yes |
Yes |
No |
Yes |
Yes |
FLOAT |
Yes |
Yes |
No |
Yes |
Yes |
INTERVAL DAY TO SECOND |
No |
No |
No |
No |
No |
INTERVAL YEAR TO MONTH |
No |
No |
No |
No |
No |
LONG RAW |
No |
No |
No |
No |
No |
NCHAR |
Yes |
Yes |
Yes |
Yes |
Yes |
|
Yes |
No |
Yes |
No |
Yes |
NUMBER |
Yes |
Yes |
No |
Yes |
Yes |
NVARCHAR2 |
Yes |
Yes |
Yes |
Yes |
Yes |
RAW |
No |
No |
No |
No |
No |
|
No |
No |
No |
No |
No |
TIMESTAMP |
Yes |
Yes |
No |
Yes |
Yes |
TIMESTAMP WITH LOCAL TIME ZONE |
Yes |
Yes |
No |
Yes |
Yes |
TIMESTAMP WITH TIME ZONE |
Yes |
Yes |
No |
Yes |
Yes |
|
No |
No |
No |
No |
No |
VARCHAR2 (Including long
|
Yes |
Yes |
Yes |
Yes |
Yes |
2.8.2 ANSI Data Types Redaction Capabilities
Oracle Data Redaction converts ANSI data types in specific ways, depending on the type of redaction that the Data Redaction policy has.
Table 2-2 compares how the full, partial, regular expression, random, and nullify redaction styles work for ANSI data types, with regard to how they are converted and their support status.
Table 2-2 Redaction Support for the ANSI Data Types
Data Type | How Converted | Full Redaction | Partial Redaction | Regexp Redaction | Random Redaction | Nullify Redaction |
---|---|---|---|---|---|---|
|
Converted to
|
Yes |
Yes |
Yes |
Yes |
Yes |
|
Converted to
|
Yes |
Yes |
Yes |
Yes |
Yes |
|
Converted to
|
Yes |
Yes |
Yes |
Yes |
Yes |
|
Converted to
|
Yes |
Yes |
Yes |
Yes |
Yes |
|
Converted to
|
Yes |
Yes |
No |
Yes |
Yes |
|
Converted to
|
Yes |
Yes |
No |
Yes |
Yes |
|
Converted to
|
Yes |
Yes |
No |
Yes |
Yes |
|
Converted to
|
Yes |
Yes |
No |
Yes |
Yes |
|
No conversion |
No |
No |
No |
No |
No |
2.8.3 Built-in and ANSI Data Types Full Redaction Capabilities
For full redaction, the default redacted value depends on whether the data type is Oracle built-in or ANSI.
Table 2-3 shows the default settings for both Oracle built-in and ANSI data type columns that use full redaction.
Table 2-3 Default Settings and Categories for Columns That Use Full Redaction
Data Type | Default Redacted Value | Data Type Category |
---|---|---|
|
Single space ( |
Oracle built-in |
|
Single space ( |
ANSI |
|
Single space ( |
ANSI |
|
Single space ( |
ANSI |
|
Single space ( |
ANSI |
|
Zero ( |
Oracle built-in |
|
Zero ( |
Oracle built-in |
|
Zero ( |
ANSI |
|
Zero ( |
ANSI |
|
Zero ( |
ANSI |
|
|
Oracle built-in |
|
Oracle’s raw representation of |
Oracle built-in |
|
|
Oracle built-in |
|
|
Oracle built-in |
Footnote 1
If you have changed the character set, then you may need to invoke the DBMS_REDACT.UPDATE_FULL_REDACTION_VALUES
procedure to set the value to the raw representation in the new character set, as follows:
DECLARE
new_red_blob BLOB;
BEGIN
DBMS_LOB.CREATETEMPORARY(new_red_blob, TRUE);
DBMS_LOB.WRITE(new_red_blob, 10, 1, UTL_RAW.CAST_TO_RAW('[redacted]'));
dbms_redact.update_full_redaction_values(
blob_val => new_red_blob);
DBMS_LOB.FREETEMPORARY(new_red_blob);
END;
/
After you run this procedure, restart the database.
See also Altering the Default Full Data Redaction Value for more information about using the DBMS_REDACT.UPDATE_FULL_REDACTION_VALUES
procedure.
2.8.4 User-Defined Data Types or Oracle Supplied Types Redaction Capabilities
Several data types are not supported by Oracle Data Redaction.
Oracle Data Redaction does not support user-defined data types or Oracle supplied types, such as anytype types, JSON types, VECTOR types, XML types, and Oracle Spatial types.