OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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.2.2

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    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.2.2
    iconOceanBase Database
    SQL - V 4.2.2
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • 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

    PARAMETER

    Last Updated:2026-04-15 08:27:14  Updated
    Share
    What is on this page
    Description
    Limitations and considerations
    Privileges
    Syntax
    Parameters
    Examples
    References

    folded

    Share

    Description

    The ALTER SYSTEM [SET] parameter_name = expression statement is used to modify the value of a parameter.

    In OceanBase Database, parameters can be cluster-level or tenant-level. A cluster-level parameter takes effect on all nodes in the cluster, whereas a tenant-level parameter takes effect on all nodes in the current tenant. For more information, see Overview.

    Limitations and considerations

    • Only the sys tenant can modify cluster-level parameters. User tenants are not allowed to modify cluster-level parameters.

    • Parameters take effect either dynamically or after a restart. Most parameters take effect dynamically, which means that you do not need to restart the OBServer node for the modification to take effect. Before you modify a parameter, you can execute the SHOW PARAMETERS LIKE statement to verify whether the parameter takes effect dynamically. For more information, see Cluster parameters.

    Privileges

    To execute the ALTER SYSTEM [SET] parameter_name = expression statement, the current user must have the ALTER SYSTEM privilege. For more information about the privileges in OceanBase Database, see Privilege types in MySQL mode and Privilege types in Oracle mode.

    Syntax

    ALTER SYSTEM [SET] alter_system_set_parameter_actions;
    
    alter_system_set_parameter_actions:
    alter_system_set_parameter_action [, alter_system_set_parameter_action...]
    
    alter_system_set_parameter_action:
    parameter_name = expression [COMMENT [=] 'text'] [SCOPE = {MEMORY | SPFILE | BOTH}] [SERVER [=] 'ip:port' | ZONE [=] 'zone_name' | TENANT [=] {sys | all_user | all | all_meta | tenant_name}]
    

    Parameters

    Parameter
    Description
    parameter_name The name of the parameter to be modified.
    expression The new value of the parameter.
    COMMENT The comment about the modification. This parameter is optional, but we recommend that you do not ignore it.
    SCOPE The effective scope of the parameter modification. Valid values: MEMORY, SPFILE, and BOTH.
    • MEMORY: specifies to modify only the value of the parameter in memory, the modification takes effect immediately, and the modification will be lost after the OBServer node is restarted. (Currently, no parameter supports this method.)
    • SPFILE: specifies to modify only the value of the parameter in the configuration table, and the modification takes effect only after the OBServer node is restarted.
    • BOTH: specifies to modify the value of the parameter in the configuration table and in memory. The modification takes effect immediately and will not be lost after the OBServer node is restarted.

    The default value of SCOPE is BOTH.
    SERVER The OBServer node in the cluster whose parameter value is to be modified. You can specify only one OBServer node.
    ZONE The zone in the cluster whose OBServer nodes have their parameter values modified. You can specify only one zone. The modification takes effect on all OBServer nodes in the zone. You cannot specify both Zone and Server.
    TENANT The tenant in which the value of the specified tenant-level parameter is to be modified. The default value is the current tenant.
    • sys: specifies to modify the parameter value in the sys tenant.
    • all_user and all: specifies to modify the parameter value in all user tenants.

      Note

      Starting from V4.2.1, OceanBase Database allows you to use TENANT = all_user and TENANT = all interchangeably to modify the parameter value in all user tenants. We recommend that you use TENANT = all_user when you need to modify the parameter value in all user tenants. TENANT = all will be deprecated.

    • all_meta: specifies to modify the parameter value in all meta tenants.
    • tenant_name: specifies a tenant. You can specify only one tenant each time.

    This clause is required when you want to modify the value of a tenant-level parameter from the sys tenant. For more information about tenant-level parameters, see Tenant-level parameters.

    Examples

    • Change the value of the cluster-level parameter enable_sql_audit in the sys tenant.

      obclient [oceanbase]> ALTER SYSTEM SET ENABLE_SQL_AUDIT = False SCOPE = BOTH;
      
    • Change the value of the tenant-level parameter connection_control_max_connection_delay in the tenant tenant in the sys tenant.

      obclient [oceanbase]> ALTER SYSTEM SET connection_control_max_connection_delay = 2147483646 TENANT = tenant;
      
    • Change the value of the tenant-level parameter major_freeze_duty_time for all tenants in the cluster (including the sys tenant, user tenants, and meta tenant) in the sys tenant.

      You need to execute the following commands in the sys tenant:

      obclient [oceanbase]> ALTER SYSTEM SET major_freeze_duty_time='01:00' TENANT = sys;
      
      obclient [oceanbase]> ALTER SYSTEM SET major_freeze_duty_time='01:00' TENANT = all_user;
      
      obclient [oceanbase]> ALTER SYSTEM SET major_freeze_duty_time='01:00' TENANT = all_meta;
      
    • Change the value of the tenant-level parameter major_freeze_duty_time in the current tenant.

      obclient [oceanbase]> ALTER SYSTEM SET major_freeze_duty_time='01:00';
      

    References

    • Set parameters

    • Overview of parameters and system variables

    Previous topic

    SET LOG_RESTORE_SOURCE
    Last

    Next topic

    RECOVER STANDBY
    Next
    What is on this page
    Description
    Limitations and considerations
    Privileges
    Syntax
    Parameters
    Examples
    References