Hi,
i have some tables with DBMS_FGA policies on them (because of AuditVault) which call an user defined audit function. When exporting the whole schema, the policies get exported too, but not the audit function, since it's created in another schema. The problem is that when I import the schema on another database, I get the following error when trying to access the data in those tables:
ORA-28112: failed to execute policy function
ORA-06512: at line 4
28112. 00000 - "failed to execute policy function"
*Cause: The policy function has one or more error during execution.
*Action: Check the trace file and correct the errors.
That's because the audit function doesn't exist in that database. The problem is solved if i drop the policies after import with e.g.:
begin
for rec in (select * from dba_audit_policies where object_schema = 'ACC') loop
dbms_fga.drop_policy(object_schema => rec.object_schema,
object_name => rec.object_name,
policy_name => rec.policy_name);
end loop;
end;
/
Does anybody know if it is possible to somehow not export those policies so that runing the above PL/SQL block after the import wouldn't be necessary?
Thanks in advance.
Regards,
Jure