Overview
audit_log_prune_seconds specifies the maximum age for audit logs.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Both the
systenant and user tenants can use theALTER SYSTEM SETstatement to modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Int |
| Default Value | 0: Do not save audit logs. The unit is seconds and the unit is not required when configuring. |
| Value range | [0, +∞) |
| Modifiable | Yes, you can use the following methods:ALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
Each time a new log file is generated for archived logs, a check is performed to see if log cleanup is needed. This check can also be triggered when the total log size reaches the limit specified by audit_log_max_size.
Configuration example
Set the maximum retention period for audit logs to 2 hours.
obclient> ALTER SYSTEM SET audit_log_prune_seconds=7200;