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_rotate_on_size specifies the size of a single audit log file.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support audit logs.
Privilege requirements
Query the parameter
The
systenant and all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify the parameter
The
systenant and user tenants can use theALTER SYSTEM SETstatement to modify this parameter.
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. |
Considerations
Audit records are continuously appended to the audit.log file. By setting audit_log_rotate_on_size, you can enable automatic log archiving. When the size of the audit.log file reaches the specified value, a new file is automatically generated. Archiving only controls the size of individual log files and does not clean up the files.
Examples
Set the size of a single audit log file to 256M.
obclient> ALTER SYSTEM SET audit_log_rotate_on_size='256M';