Note
This variable is available starting with V2.1.
Description
ob_enable_sql_audit specifies whether to enable the SQL audit feature for the current tenant.
Privilege requirements
Query variables
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to view the value of a global system variable.Modify variables
The
systenant can directly modify the value of a global system variable.A MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.An Oracle user tenant must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Bool |
| Default value | true |
| Value range |
|
| Scope | Global |
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Usage notes
If the enable_sql_audit parameter is set to false, the SQL audit feature is disabled for all tenants.
Examples
Set the SQL audit feature for the current tenant.
obclient> SET GLOBAL ob_enable_sql_audit =true;