Difference between revisions of "ORA-28112: failed to execute policy function"

From dbawiki
Jump to: navigation, search
(Created page with "===Problem=== Getting error "'''ORA-28112: failed to execute policy function'''" when exporting or importing using DataPump During expdp is accompanied by "'''ORA-31693: Table da...")
 
(Reason)
Line 3: Line 3:
 
During expdp is accompanied by "'''ORA-31693: Table data object "SYSMAN"."MGMT_IP_REPORT_DEF" failed to load/unload and is being skipped due to error:'''"
 
During expdp is accompanied by "'''ORA-31693: Table data object "SYSMAN"."MGMT_IP_REPORT_DEF" failed to load/unload and is being skipped due to error:'''"
 
===Reason===
 
===Reason===
This happens due to audit policies being defined on the table but the function is defined in another schema.
+
This happens due to audit policies being defined on the table but the policy function is defined in another schema.
 +
 
 
===Solution===
 
===Solution===
 
Either drop the policy after importing the table with:
 
Either drop the policy after importing the table with:

Revision as of 08:26, 6 December 2011

Problem

Getting error "ORA-28112: failed to execute policy function" when exporting or importing using DataPump During expdp is accompanied by "ORA-31693: Table data object "SYSMAN"."MGMT_IP_REPORT_DEF" failed to load/unload and is being skipped due to error:"

Reason

This happens due to audit policies being defined on the table but the policy function is defined in another schema.

Solution

Either drop the policy after importing the table with:

begin
  for rec in (select * from dba_audit_policies where object_schema = 'SYSMAN') loop
  dbms_fga.drop_policy(object_schema => rec.object_schema,
                         object_name => rec.object_name,
                         policy_name => rec.policy_name);  
  end loop;
end;
/

or exclude the policies during export by adding this to the .par file:

exclude=FGA_POLICY