Note
This variable was introduced in OceanBase Database V2.1.
Description
ob_trx_idle_timeout specifies the idle timeout period of a transaction. A timeout error occurs if the execution interval between two consecutive statements in the transaction exceeds the value of this variable.
Limitations
Query the variable
Global-level operation
In the
systenant or a user tenant, you can execute theSHOW VARIABLESstatement to query the variable at the global level or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (in Oracle mode) orinformation_schema.GLOBAL_VARIABLESview (in MySQL mode) for the variable at the global level.Session-level operation
In the
systenant or a user tenant, you can execute theSHOW VARIABLESstatement to query the variable at the session level or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (in Oracle mode) orinformation_schema.SESSION_VARIABLESview (in MySQL mode) for the variable at the session level.
Modify the variable
Global-level operation
In the
systenant, you can directly change the value of the variable at the global level.In a MySQL user tenant, you must have the
SUPERorALTER SYSTEMprivilege to change the value of the variable at the global level.In OceanBase Database V4.2.0 and later V4.x versions, you must have the
ALTER SYSTEMprivilege to change the value of the variable at the global level in an Oracle user tenant.
Session-level operation
In the
systenant or a user tenant, you can directly change the value of the variable at the session level for the current tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | Integer |
| Default value | 86400000000, in μs.
NoteIn OceanBase Database V4.0.0 and later, the default value of this variable is changed from |
| Value range | [100000000, +∞) |
| Effective scope |
|
| Modifiable | Yes. You can use the SET statement to modify the variable. |
Examples
Set the idle timeout period of a transaction to 86,400,000,000 μs.
Session-level operation
obclient> SET ob_trx_idle_timeout =86400000000;Global-level operation
obclient> SET GLOBAL ob_trx_idle_timeout =86400000000;