OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.3.1

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.3.1
    iconOceanBase Database
    SQL - V 4.3.1
    SQL
    KV
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Overview

    Last Updated:2026-04-15 08:25:14  Updated
    share
    What is on this page
    Parameters
    System variables
    Comparison between parameters and variables

    folded

    share

    OceanBase Database allows you to set parameters and system variables to manage configurations.

    Parameters

    Parameters are usually used to control system behaviors at the server level or a higher level during O&M. You can set parameters for starting OBServer nodes and creating tenants. You can also modify them during the operation of OBServer nodes to adjust system behaviors. For more information about parameters, see Set parameters.

    System variables

    System variables are usually bound to user sessions to control session-level SQL behaviors.

    You can set global and session-level system variables. After you set a global system variable, the setting does not take effect for the current session but applies to all sessions established later. After you set a session-level system variable, the setting takes effect only for the current session.

    For more information about system variables, see Set variables.

    Comparison between parameters and variables

    Comparison item System parameter System variable
    Effective scope Affects a cluster, tenant, zone, or server. Affects a tenant globally or at the session level.
    Effective mode
    • Dynamically takes effect: The value of edit_level is dynamic_effective.
    • Takes effect upon restart: The value of edit_level is static_effective.
    • A session-level variable takes effect only on the current session.
    • A global variable does not take effect on the current session and takes effect only on sessions established upon re-logon.
    Modification
    • Modification can be performed by using SQL statements. For example:
      obclient> Alter SYSTEM SET schema_history_expire_time='1h';
    • Modification can be performed by setting startup parameters. For example:
      cd /home/admin && ./bin/observer -o "schema_history_expire_time='1h'"
    Modification can be performed only by using SQL statements. Here are some examples:
    • MySQL mode
      obclient> SET ob_query_timeout = 20000000;
      obclient> SET GLOBAL ob_query_timeout = 20000000;
    • Oracle mode
      obclient> SET ob_query_timeout = 20000000;
      obclient> SET GLOBAL ob_query_timeout = 20000000;
      obclient> ALTER SESSION SET ob_query_timeout = 20000000;
      obclient> ALTER SYSTEM SET ob_query_timeout = 20000000;
    Persistence Parameters are persisted into internal tables and configuration files and can be queried from the /home/admin/oceanbase/etc/observer.config.bin and /home/admin/oceanbase/etc/observer.config.bin.history files. Only global variables are persisted, while those at the session level are not.
    Lifecycle Long. A system parameter remains effective for the entire duration of a process. Short. A system variable takes effect only after the tenant schema is created.
    Query method You can query a system parameter by using the SHOW PARAMETERS statement. For example:
    obclient> SHOW PARAMETERS LIKE 'schema_history_expire_time';
    You can query a system variable by using the SHOW [GLOBAL] VARIABLES or SELECT statement. Here are some examples:
    • MySQL mode
      obclient> SHOW VARIABLES LIKE 'ob_query_timeout';
      obclient> SHOW GLOBAL VARIABLES LIKE 'ob_query_timeout';
      obclient> SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'ob_query_timeout';
      obclient> SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'ob_query_timeout';
    • Oracle mode
      obclient> SHOW VARIABLES LIKE 'ob_query_timeout';
      obclient> SHOW GLOBAL VARIABLES LIKE 'ob_query_timeout';
      obclient> SELECT * FROM SYS.TENANT_VIRTUAL_GLOBAL_VARIABLE WHERE VARIABLE_NAME = 'ob_query_timeout';
      obclient> SELECT * FROM SYS.TENANT_VIRTUAL_SESSION_VARIABLE WHERE VARIABLE_NAME = 'ob_query_timeout';

    Previous topic

    Diagnose memory errors
    Last

    Next topic

    Set parameters
    Next
    What is on this page
    Parameters
    System variables
    Comparison between parameters and variables