Note
- For V4.3.x, this parameter is available starting with V4.3.3.
- For V4.2.x, this parameter is available starting with V4.2.4.
Description
audit_log_max_size specifies the maximum size of audit logs stored on each OBServer node.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support the audit feature.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter by using theALTER SYSTEM SETstatement.
Attributes
| Attribute | Description |
|---|---|
| Type | Capacity |
| Default value | 0M, which indicates that audit logs are not stored. |
| 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
When a new log file is generated during log archiving, the system checks whether to clear logs. The total size of logs is calculated separately for each OBServer node. If the total size exceeds the maximum allowed size, the system clears the oldest log files first.
Examples
Set the maximum size of audit logs stored on each OBServer node to 4G.
obclient> ALTER SYSTEM SET audit_log_max_size='4G';
