Note
This parameter was introduced in OceanBase Database V4.2.4.
Description
audit_log_max_size specifies the maximum size of audit logs that can be retained on a single OBServer node.
Applicability
This parameter is applicable to only OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support the audit feature.
Limitations
Query the parameter
In the
systenant or a user tenant, you can execute theSHOW PARAMETERSstatement to query the parameter or query theGV$OB_PARAMETERSview for the parameter.Modify the parameter
You can use the
ALTER SYSTEM SETstatement to modify the parameter in thesystenant or a user tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Capacity |
| Default value | 0M, which indicates that audit logs are not to be retained. |
| Value range | [0M, +∞) |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
Each time a new archive log file is generated, the system checks whether logs need to be cleared. The total size of logs is calculated separately in the directory of each OBServer node. When the total size of logs exceeds the maximum size allowed, the system preferentially clears the earliest archive log file.
Examples
Set the maximum size of audit logs that can be retained on a single OBServer node to 4 GB.
obclient> ALTER SYSTEM SET audit_log_max_size='4G';