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
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 obtain the values of global system variables.Modify variables
systenant can modify the values of global system variables.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the values of global system variables.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the values of global system variables.
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 to enabled for the current tenant.
obclient> SET GLOBAL ob_enable_sql_audit =true;