ob_read_consistency

2025-12-01 14:37:59  Updated

Note

This variable is available starting with V1.4.

Description

ob_read_consistency specifies the read consistency level.

Privilege requirements

  • Query variables

    • Global level

      sys tenant and all user tenants can execute the SHOW VARIABLES statement or query the SYS.TENANT_VIRTUAL_GLOBAL_VARIABLE view (Oracle mode) or the information_schema.GLOBAL_VARIABLES view (MySQL mode) to obtain the value of a global system variable.

    • Session level

      sys tenant and all user tenants can execute the SHOW VARIABLES statement or query the SYS.TENANT_VIRTUAL_SESSION_VARIABLE view (Oracle mode) or the information_schema.SESSION_VARIABLES view (MySQL mode) to obtain the value of a session system variable.

  • Modify variables

    • Global level

      • sys tenant can directly modify the value of a global system variable.

      • MySQL user tenants must have the SUPER or ALTER SYSTEM privilege to modify the value of a global system variable.

      • Oracle user tenants must have the ALTER SYSTEM privilege to modify the value of a global system variable.

    • Session level

      sys tenant and all user tenants can directly modify the value of a session system variable.

Attributes

Attribute Description
Type Enum
Default value STRONG
Value range
  • 0: empty string
  • 1: FROZEN
  • 2: WEAK
  • 3: STRONG
Scope
  • Global
  • Session
Modifiable Yes. You can execute the SET statement to modify the value.

Examples

Set the read consistency level to STRONG.

  • Session level

    obclient> SET ob_read_consistency='STRONG';
    
  • Global level

    obclient> SET GLOBAL ob_read_consistency='STRONG';
    

Contact Us