我正在尝试使用以下脚本为数据库中的列创建策略,该脚本在一个数据库中成功创建,但在其他数据库中却出现错误。
仅供参考:两个数据库在 DBMS_REDACT POLICY 上都有 EXECUTE PRIVILEGE
ORA-28086: 数据编辑策略表达式有错误。
BEGIN
DBMS_REDACT.ADD_POLICY(
object_schema =>'schemaname',
object_name =>'tablename',
column_name =>'columnname',
policy_name =>'policyneme',
function_type =>DBMS_REDACT.REGEXP,
policy_description =>'Masks the first 5 digits of SSN',
regexp_replace_string =>'XXXXX\3',
regexp_position =>1,
regexp_occurrence =>0,
regexp_match_parameter =>'i',
expression =>'1=1',
regexp_pattern =>'(\d\d\d)(\d\d)(\d\d\d\d)'
);
END;