Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to not export DBMS_FGA audit policies

user633661Jan 15 2010 — edited Jan 18 2010
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
This post has been answered by Dean Gagne-Oracle on Jan 15 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2010
Added on Jan 15 2010
5 comments
3,273 views