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
systenants and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle-compatible mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL-compatible mode) to obtain the value of a global system variable.Modify variables
systenants can directly modify the value of a global system variable.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Boolean |
| Default value | true |
| Value range |
|
| Scope | Global |
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Syntax
enable_sql_audit specifies whether to enable the SQL audit feature for all tenants. If the value is false, the SQL audit feature is disabled for all tenants.
Examples
Set the value of ob_enable_sql_audit to true to enable the SQL audit feature for the current tenant.
obclient> SET GLOBAL ob_enable_sql_audit =true;