Creating a redaction policy when using regular expression redaction
A regular expression redaction type enables you to create and implement flexible redaction rules. You define patterns that will be used in order to match and replace data, as well as some other parameters of the search. In this recipe, you will create the redaction policy SHORT_POL
, which will be used to mask customers' phone numbers.
Getting ready
To complete this recipe, you'll need:
An existing user who can view data in the
SH.CUSTOMERS
sample table but doesn't have an exempt redaction policy privilege (for example,sh
)The
secmgr
user you created in the Creating redaction policy using full redaction recipe or another user who can create redaction policies (has execute ondbms_redact
package)
How to do it...
Connect to the database as a user who has the
SELECT
privilege on theSH.CUSTOMERS
table or theSELECT ANY TABLE
privilege (for example, thesh
user):$ sqlplus sh
Verify that the user (for example, the user
sh
) can view...