Oracle 12c how to purge the FGA audit records before a certain date

by miguel ramires   Last Updated October 09, 2019 19:06 PM

please I need to know how to purge the FGA audit records before a certain date, I have an Oracle 12c R1 database in which the audit with FGA is implemented, the tables of this are in a tablespace called ts_audit.dbf that It has already had 3 full datafiles and continues to be filled at a dizzying pace due to the intensive use of the database, for this reason I need to purge the oldest records, let's just leave those of the last week. Thank you very much for your help.



Answers 1


Administering the Audit Trail

begin
  DBMS_AUDIT_MGMT.SET_LAST_ARCHIVE_TIMESTAMP
  (
    audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_FGA_STD,
    last_archive_time => sysdate - 7
  );
end;
/


begin
  DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL
  (
    audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_FGA_STD,
    use_last_arch_timestamp => true
  );
end;
/
Balazs Papp
Balazs Papp
October 09, 2019 18:49 PM

Related Questions


Updated June 24, 2017 20:06 PM

Updated June 24, 2017 20:06 PM

Updated May 14, 2017 11:06 AM

Updated March 09, 2017 17:06 PM

Updated October 18, 2019 20:06 PM