Database Security Products (MOSC)

MOSC Banner

DBMS_REDACT

Hello,

We're implementing data masking for certain fields in database with varying patterns. One of the varchar2 fields in a table can have all Characters, Alphanumeric, or Numbers. We're written the REGEXP_REPLACE for that:
SELECT name, REGEXP_REPLACE (name,
'(.*)([^[:alpha:]]{4})',
'********\2',
1,
0,
'i') FROM my_table;


Original Value | Redacted Value

=================================================

All Chars : Ambikesh Pagare | Ambikesh Pagare

All Numbers : 0100022749513 | ********9513

Alphanumeric : CIB001 005 1234 | ********1234


The query provides the right results, however when the same expression is given on the REDACT POLICY, the all characters return null in the redacted column.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center