Skip to Main Content

Oracle Database Discussions

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!

Unified audit trail - purge not deleteing all trails

994543Apr 3 2017 — edited Apr 3 2017

I got database 12c on linux

Enabled unified auditing on a table and another policy for users login/logoff/failed logins.

I want to delete every entry that is older than 15 days. I have created last_archive_timestamp as:

dbms_audit_mgmt.set_last_archive_timestamp(
  AUDIT_TRAIL_TYPE 
=> dbms_audit_mgmt.audit_trail_unified,
  LAST_ARCHIVE_TIME 
=> sysdate-15);

Then i have created a procedure that will purge any entry that is older than 15days (using last_archive_ts):

BEGIN
  DBMS_AUDIT_MGMT
.clean_audit_trail(
  audit_trail_type 
=> DBMS_AUDIT_MGMT.audit_trail_unified,
  use_last_arch_timestamp
=> TRUE);
END;
/

Entries in unified audit tables are remaining even tho their time stamp is months older than my last_archive_ts.

How do i delete Every entry that is older than 15 days?

Message was edited by: 994543 Fixed typo.

This post has been answered by MsJ on Apr 3 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2017
Added on Apr 3 2017
4 comments
2,501 views