ORA-28086: The data redaction policy expression has an error


Error:


ERROR at line 1:
ORA-28086: The data redaction policy expression has an error.
ORA-06512: at "SYS.DBMS_REDACT_INT", line 3
ORA-06512: at "SYS.DBMS_REDACT", line 42
ORA-06512: at line 1

When we try to run same as sys user it is working perfectly fine, but as a normal user it is failing with below errors.




No Privileges issue because AVO user had DBA Privilege ..

Versions confirmed as being affected

Fixed:

The fix for 20693579 is first included in


Cause :


To BottomTo Bottom


Bug 20693579  DBMS_REDACT.ADD_POLICY fails with ORA-28086 when CURSOR_SHARING is force

 This note gives a brief overview of bug 20693579.
 The content was last updated on: 17-FEB-2017
 Click here for details of each of the sections below.

Affects:

Product (Component)Oracle Server (Rdbms)
Range of versions believed to be affectedVersions >= 12.1 but BELOW 12.2
Versions confirmed as being affected
Platforms affectedGeneric (all / most platforms affected)

Fixed:

The fix for 20693579 is first included in

Interim patches may be available for earlier versions - click here to check.

Symptoms:

Related To:

Description

Creating a Data Redaction policy may fails with an
   ORA-28086: The data redaction policy expression has an error.
when CURSOR_SHARING is set to FORCE using
   alter system set cursor_sharing=force;
when using a simple Policy Expression such as '1=1', or a Policy Expression involving any constants.
 
Eg:
 connect scott/tiger
 create table tt (c1 number,c2 varchar2(50));
 
 connect / as sysdba
 alter system set cursor_sharing=force;
 alter system flush buffer_cache;
 alter system flush shared_pool;
 
 begin
  dbms_redact.add_policy(
    object_schema=>'SCOTT'
   ,object_name=>'TT'
   ,column_name=>'C1'
   ,policy_name=>'P1'
   ,function_type=>DBMS_REDACT.FULL
   ,expression=>'1=1');
 end;
 /
 
 ^
 ORA-28086: The data redaction policy expression has an error.
 
Workaround
 None
 
Thanks
Anil 

Comments

  1. If the cursor_sharing=FORCE, then this issue might occur. I am using Oracle database version -11.2.0.4. I have changed the cursor_sharing='EXACT' value and it works fine.



    SQL> sho parameter cursor

    NAME TYPE
    ------------------------------------ -------------------------
    VALUE
    ------------------------------
    cursor_bind_capture_destination string
    memory+disk
    cursor_sharing string
    FORCE
    cursor_space_for_time boolean
    FALSE
    open_cursors integer
    5000
    session_cached_cursors integer

    NAME TYPE
    ------------------------------------ -------------------------
    VALUE
    ------------------------------
    5000
    SQL> alter session set cursor_sharing='EXACT';

    Session altered.

    ReplyDelete

Post a Comment

Popular posts from this blog

ORA-65139: Mismatch between XML metadata file and data file

Useful OEM Queries to get Target details from OEM Repository