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_strategy specifies the strategy for writing audit records to files.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support audit features.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query the value of this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify the value of this parameter by using theALTER SYSTEM SETstatement.
Attributes
| Attribute | Description |
|---|---|
| Type | String |
| Default value | ASYNCHRONOUS |
| Value range |
|
| 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
You can set the audit_log_strategy parameter to specify the strategy for writing audit records to files. This way, you can achieve a balance between performance and log integrity. When asynchronous log writing is enabled, you can set the audit_log_buffer_size parameter to specify the buffer size.
Examples
Set the strategy for writing audit records to asynchronous log writing. When the buffer is full, the system waits synchronously.
obclient> ALTER SYSTEM SET audit_log_strategy='ASYNCHRONOUS';