How to perform the audit trail purge in Oracle?
To perform the audit trail purge tasks, in most cases, you use the DBMS_AUDIT_MGMT PL/SQL package. You must have the AUDIT_ADMIN role before you can use the DBMS_AUDIT_MGMT package. Oracle Database mandatorily audits all executions of the DBMS_AUDIT_MGMT PL/SQL package procedures.
How are audit records written in Oracle 12c?
Oracle Database automatically writes audit records to an internal relational table in the AUDSYS schema. In Oracle Database 12c release 1 (12.1), you had the option of queuing the audit records in memory (queued-write mode) and be written periodically to the AUDSYS schema audit table.
When is auditing enabled in the Oracle Database?
Auditing is always enabled. Oracle Database generates audit records during or after the execution phase of the audited SQL statements. Oracle Database individually audits SQL statements inside PL/SQL program units, as necessary, when the program unit is run.
How to purge audit records in DBMS-audit-table?
Set LAST_ARCHIVE_TIMESTAMP: This value allows the audit record to be purged before a particular date. Suppose LAST_ARCHIVE_TIME is set to SYSTIMESTAMP -30, then it will keep only recent 30 days record and purge the all audit records dated before 30 days.
How to disable unified audit trail in Oracle?
In situations where the database table is unable to accept unified audit records, these records will be written to operating system spillover audit files ( .bin format). Audit records written to the spillover audit files can be moved to the unified audit trail database table. You can disable unified auditing.
When does the Oracle Database generate audit records?
Oracle Database generates audit records during or after the execution phase of the audited SQL statements. Oracle Database individually audits SQL statements inside PL/SQL program units, as necessary, when the program unit is run. You can control the frequency when audit trail records are written to disk.
What happens to the audit trail when the database is not partitioned?
If the database version does not support partitioning, then the internal table is a regular, non-partitioned table. The generation and insertion of an audit trail record is independent of the user transaction being committed. That is, even if a user transaction is rolled back, the audit trail record remains committed.