Note
- For V4.3.x, this parameter was introduced in V4.3.3.
- For V4.2.x, this parameter was introduced in V4.2.4.
Description
audit_log_rotate_on_size specifies the maximum size of a single audit log file.
Applicability
This content applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support the auditing 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 | 256M |
| 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. |
Usage
Audit records are continuously appended to the audit.log file. You can set audit_log_rotate_on_size to enable automatic log archiving. When the size of audit.log reaches the specified value, a new file is automatically created. Archiving only controls the size of individual log files and does not handle file cleanup.
Example
Set the maximum size of a single audit log file to 256M.
obclient> ALTER SYSTEM SET audit_log_rotate_on_size='256M';