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 onÂdbms_redact
package)
How to do it...
Connect to the database as a user who has theÂ
SELECT
privilege on theÂSH.CUSTOMERS
table or theÂSELECT ANY TABLE
privilege (for example, theÂsh
user):$ sqlplus sh
Verify that the user (for example, the userÂ
sh
) can view...