Configuring whether loss of audit data is acceptable
In this recipe, you'll learn to set whether audit data is queued in memory or is immediately written to audit trail.
Getting ready
To complete this recipe, you'll need an existing user who has the audit_admin
role (for example, jack
).
How to do it...
Connect to the database as user who has the
audit_admin
role (for example,jack
):SQL> connect jack
If you want audit records to be immediately written to the unified audit trail set immediate-write mode:
SQL> EXEC DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_PROPERTY (DBMS_AUDIT_MGMT.AUDIT_TRAIL_UNIFIED,DBMS_AUDIT_MGMT. AUDIT_TRAIL_WRITE_MODE, DBMS_AUDIT_MGMT.AUDIT_TRAIL_IMMEDIATE_WRITE);
Check that the mode is set to immediate-write:
SQL> select * from dba_audit_mgmt_config_params where parameter_name='AUDIT WRITE MODE';
You should see that the value for the AUDIT WRITE MODE
parameter is IMMEDIATE WRITE MODE
:
PARAMETER_NAME PARAMETER_VALUE AUDIT_TRAIL ----------------...