Running Oracle 11.2.0.4. We're attempting to purge OS Audit files (.aud) in this case on an AIX system.
Using this command:
begin
dbms_audit_mgmt.create_purge_job (
audit_trail_type => dbms_audit_mgmt.audit_trail_OS,
audit_trail_purge_interval => 24,
audit_trail_purge_name => 'OS_PURGE',
use_last_arch_timestamp => TRUE
);
end;
/
I was able to delete files >30 days old using this command to create a timestamp:
begin
dbms_audit_mgmt.set_last_archive_timestamp(
audit_trail_type => dbms_audit_mgmt.audit_trail_OS,
last_archive_time =>
to_timestamp('2015-03-14 00:00:00','YYYY-MM-DD HH24:MI:SS'),
rac_instance_number => null
);
end;
/
The way it's setup, I can get it to delete all files before March 14th every 24 hours, which is good for April 14th, 2015! However, we need someway to do this automatically.
Is there anyway to either have some alternate use of "use_last_arch_timestamp => false" so that it doesn't use a time stamp but also doesn't delete everything?
Or is there a way to automate the creation of a timestamp that would create something 30 days prior?
Also, I apologize if I didn't put this in the right Place, I was not sure at all where I should put this.