ORA-28112: failed to execute policy function
From dbawiki
Revision as of 08:25, 6 December 2011 by 10.250.159.106 (talk) (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...")
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 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