Database Reference
In-Depth Information
SQL> GRANT EXECUTE ON DBMS_REDACT TO scott;
Grant succeeded.
SQL> BEGIN
2 DBMS_REDACT.ADD_POLICY(
3 OBJECT_SCHEMA => 'SCOTT',
4 OBJECT_NAME => 'CREDIT_CARD',
5 COLUMN_NAME => 'CARD_ID',
6 POLICY_NAME => 'MASK_CREDIT_CARD_CARD_ID',
7 FUNCTION_TYPE => DBMS_REDACT.REGEXP,
8 EXPRESSION => '1=1',
9 REGEXP_PATTERN => '(\d{4})-(\d{4})-(\d{4})-(\d{4})',
10 REGEXP_REPLACE_STRING => 'XXX-XX-\3',
11 REGEXP_POSITION => 1,
12 REGEXP_OCCURRENCE => 0,
13 REGEXP_MATCH_PARAMETER => 'ic');
14 END;
15 /
PL/SQL procedure successfully completed.
C:\Windows\System32>sqlplus scott/scott@192.168.56.101/orcl
SQL*Plus: Release 12.1.0.1.0 Production on Sun Feb 16 20:15:42 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select * from scott.credit_card;
CUST_NAME
----------------------------------------------------------------
CARD_ID
--------------------------------------------------------------------------------
Marco
XXX-XX-1234
Hans
XXX-XX-5678
SQL> select * from scott.credit_card where 1=ordsys.ord_dicom.getmappingxpath((card_id),user,user);
select * from scott.credit_card where 1=ordsys.ord_dicom.getmappingxpath((card_id),user,user)
*
ERROR at line 1:
ORA-53044: invalid tag: 1234-1234-1234-1234
ORA-06512: at "ORDSYS.ORDERROR", line 5
ORA-06512: at "ORDSYS.ORD_DICOM_ADMIN_PRV", line 1394
Search WWH ::




Custom Search