Note
This variable is available starting with OceanBase Database V1.4.
Description
ob_trx_timeout specifies the timeout period of a transaction.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLE(Oracle mode) orinformation_schema.GLOBAL_VARIABLES(MySQL mode) view to get the value of a global system variable.Session level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLE(Oracle mode) orinformation_schema.SESSION_VARIABLES(MySQL mode) view to get the value of a session system variable.
Modify variables
Global level
The
systenant can modify the value of a global system variable.In MySQL mode, a user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.In Oracle mode, a user tenant must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
The
systenant and all user tenants can modify the value of a session system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 86400000000 microseconds.
NoteIn OceanBase Database V4.0.0 and later, the default value is changed from 100000000 to 86400000000 microseconds. |
| Scope |
|
| Modifiable | Yes. You can modify the value by executing the SET or ALTER SESSION SET statement. |
Examples
Set the timeout period of a transaction to 86400000000 microseconds.
Session level
obclient> SET ob_trx_timeout =86400000000;Global level
obclient> SET GLOBAL ob_trx_timeout =86400000000;
