Unified Auditing: Unable To Clean Audit Trail Based On Last Archive Timestamp (Doc ID 1956200.1)

Last updated on OCTOBER 12, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Information in this document applies to any platform.

Symptoms

1. When using the unified audit trail in 12.1.0.1 or later and  package dbms_audit_mgmt.clean_audit_trail package is used to delete audit based on a last archive timestamp then it can fail with error:

 

ORA-08180: no snapshot found based on specified time
ORA-06512: at "SYS.DBMS_AUDIT_MGMT", line 5134
ORA-06512: at "SYS.DBMS_AUDIT_MGMT", line 1187
ORA-06512: at line 2



Test Case:

begin
  dbms_audit_mgmt.set_last_archive_timestamp (
  audit_trail_type => dbms_audit_mgmt.audit_trail_unified
  ,last_archive_time => sysdate - 1);
end;
/

begin
 dbms_audit_mgmt.clean_audit_trail (
  audit_trail_type => dbms_audit_mgmt.audit_trail_unified
  ,use_last_arch_timestamp => true);
end;
/

SQL> begin
  dbms_audit_mgmt.set_last_archive_timestamp (
  audit_trail_type => dbms_audit_mgmt.audit_trail_unified
  ,last_archive_time => sysdate - 1);
end;
/ 2 3 4 5 6

PL/SQL procedure successfully completed.

SQL> begin
 dbms_audit_mgmt.clean_audit_trail (
  audit_trail_type => dbms_audit_mgmt.audit_trail_unified
  ,use_last_arch_timestamp => true);
end;
/ 2 3 4 5 6
begin
*
ERROR at line 1:
ORA-08180: no snapshot found based on specified time
ORA-06512: at "SYS.DBMS_AUDIT_MGMT", line 5134
ORA-06512: at "SYS.DBMS_AUDIT_MGMT", line 1187
ORA-06512: at line 2


Changes

Switching to unified audit trail

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms