ORA-28086:数据编校策略表达式有错误

时间:2015-09-17 17:38:10

标签: oracle policy redaction

我正在尝试使用下面的脚本为数据库中的列创建策略,该脚本在一个数据库中成功创建,但在其他数据库中却出错。

仅供参考:两个数据库在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;

1 个答案:

答案 0 :(得分:0)

这是一个在12.2中修复的错误

当cursor_sharing = force时,它将失败并出现以下错误 ORA-28086:数据编校策略表达式有错误 http://oraniltips.blogspot.in/2017/03/ora-28086-data-redaction-policy.html?m=1