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_strategy specifies the strategy for writing audit records to files.
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 | 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. |
Usage
You can use audit_log_strategy to balance performance and log integrity. When asynchronous writing is used, you can control the buffer size by using audit_log_buffer_size.
Example
Set the audit record write strategy to asynchronous mode, with synchronous wait when the buffer is full.
obclient> ALTER SYSTEM SET audit_log_strategy='ASYNCHRONOUS';