My Oracle Support Banner

Data Redaction Error While Doing An Expdp: ORA-28081: Insufficient privileges - the command references a redacted object. (Doc ID 1631729.1)

Last updated on MARCH 15, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Information in this document applies to any platform.

Symptoms

NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner. 

On : 11.2.0.4 version, Database Security

When attempting to export a table which is protected by Oracle Data redaction Policy
the following error occurs.

ERROR
-----------------------
ORA-28081: Insufficient privileges - the command references a redacted object.


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. create table USER1.S_CONTACT (contact_id number, WORK_PH_NUM varchar2(10));
2. Insert into USER1.S_CONTACT values ('1','01037541'); commit;
3.BEGIN
  DBMS_REDACT.ADD_POLICY(
  object_schema => 'USER1',
  object_name => 'S_CONTACT',
  column_name => 'WORK_PH_NUM',
  policy_name => 'REDACT_WORK_PH_NUM',
  function_type => DBMS_REDACT.PARTIAL,
  function_parameters => 'VVVVVVVVVV,VVVVVVVVVV,X,1,6',
  expression => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'')=''REDACTEST1''',
  policy_description => 'Redacts WORK_PH_NUM with character X',
  column_description => 'SSN contains character WORK_PH_NUM');
END;
/

4. expdp system/xxxxx TABLES=USER1.S_CONTACT DIRECTORY=DATA_PUMP_DIR DUMPFILE=exp_S_CONTACT.dmp LOGFILE=exp_S_CONTACT.log

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.