transaction_isolation

2025-12-04 07:10:03  Updated

Description

transaction_isolation specifies the transaction isolation level. It is identical to the system variable tx_isolation.

Privilege requirements

  • Query variables

    • Global level

      The sys tenant and all user tenants can use the SHOW VARIABLES statement or the SYS.TENANT_VIRTUAL_GLOBAL_VARIABLE view (Oracle mode) or the information_schema.GLOBAL_VARIABLES view (MySQL mode) to query the value of Global system variables.

    • Session level

      The sys tenant and all user tenants can use the SHOW VARIABLES statement or the SYS.TENANT_VIRTUAL_SESSION_VARIABLE (Oracle mode) and information_schema.SESSION_VARIABLES (MySQL mode) views to view the values of Session system variables.

  • Modify variables

    • Global level

      • The sys tenant can directly modify the values of Global system variables.

      • MySQL user tenants must have the SUPER or ALTER SYSTEM privilege to change the value of Global system variables.

      • For V4.x releases, starting from V4.2.0, an Oracle user tenant must have the ALTER SYSTEM privilege to change the value of global system variables.

    • Session level

      Users of the sys and all user tenants can directly modify the values of the system variables of their tenants.

Attributes

Attribute Description
Parameter type Varchar
Default value READ-COMMITTED
Value
  • READ-COMMITTED indicates Read Committed isolation.
  • REPEATABLE-READ indicates Repeated Read isolation.
  • SERIALIZABLE indicates Serializable isolation.
Scope
  • Global
  • Session
Modifiable Yes. You can execute the SET statement to modify the value.

Examples

Set the transaction isolation level of a transaction to READ-COMMITTED.

  • Session level

    obclient> SET transaction_isolation = 'READ-COMMITTED';
    
  • Global level

    obclient> SET GLOBAL transaction_isolation = 'READ-COMMITTED';
    

References

For more information about the transaction isolation levels, see Overview of transaction isolation levels.

Contact Us