Skip to content

Instantly share code, notes, and snippets.

@vmleon
Created January 28, 2021 16:21
Show Gist options
  • Save vmleon/82525b98c75ffd56d5144412a50a7cf0 to your computer and use it in GitHub Desktop.
Save vmleon/82525b98c75ffd56d5144412a50a7cf0 to your computer and use it in GitHub Desktop.
Oracle DB Security Redaction: enable redaction on column
BEGIN
DBMS_REDACT.ADD_POLICY(
OBJECT_SCHEMA => 'APP',
OBJECT_NAME => 'USERS',
COLUMN_NAME => 'CARD_NUMBER',
POLICY_NAME => 'mask_user_card_nums',
FUNCTION_TYPE => DBMS_REDACT.PARTIAL,
FUNCTION_PARAMETERS => DBMS_REDACT.REDACT_CCN16_F12,
EXPRESSION => '1=1'
);
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment