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.3.3

    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.3.3
    iconOceanBase Database
    SQL - V 4.3.3
    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

    Upgrade a tenant after restore

    Last Updated:2024-12-02 03:48:29  Updated
    Share
    What is on this page
    Limitations
    Prerequisites
    Procedure

    folded

    Share

    If you restore a standby tenant from backup files of OceanBase Database to a cluster of a later version, after you convert the standby tenant into the primary tenant, you must upgrade the tenant.

    Limitations

    • Only OceanBase Database V4.1.0.0 and later allow you to upgrade a restored tenant.

    • This feature is not supported for quick restore.

    Prerequisites

    The restored standby tenant has been converted into to the primary tenant. For more information, see Convert a standby tenant into primary tenant.

    Procedure

    1. Log in as the root user to the sys tenant of the cluster where the restored tenant resides.

    2. Execute the following statement to upgrade the restored tenant:

      ALTER SYSTEM RUN UPGRADE JOB "UPGRADE_ALL" TENANT = tenant_name;
      

      Here, tenant_name specifies the name of the restored tenant. You can upgrade multiple tenants at a time. Separate the tenant names with commas (,).

    3. After the upgrade, check whether the tenant is successfully upgraded. The query statement varies with the version of the current OceanBase cluster.

      • When the current OceanBase cluster is of a version earlier than V4.2.1.1:

        A sample query statement is as follows:

        obclient [(none)]> SELECT distinct(value) FROM oceanbase.GV$OB_PARAMETERS WHERE tenant_id =1004;
        

        Here, 1004 is the tenant_id value of the upgraded tenant. You can obtain the value of tenant_id by querying the DBA_OB_TENANTS view.

        If the query result is a row and the value column displays the four-digit version number of the current cluster, such as 4.2.1.0, the tenant upgrade is successful.

      • When the current OceanBase cluster is of V4.2.1.1 or later:

        A sample query statement is as follows:

        obclient [(none)]> SELECT count(*) FROM oceanbase.DBA_OB_CLUSTER_EVENT_HISTORY WHERE event = 'UPGRADE_ALL' AND value3 ='4.2.1.1' AND value5 = '1004';
        

        where

        • 4.2.1.1 indicates the four-digit version number of the current cluster.

        • 1004 is the tenant_id value of the upgraded tenant. You can obtain the value of tenant_id by querying the DBA_OB_TENANTS view.

        If the query result is not 0, the tenant is successfully upgraded.

    Previous topic

    Convert a standby tenant into primary tenant
    Last

    Next topic

    Parameters related to physical restore
    Next
    What is on this page
    Limitations
    Prerequisites
    Procedure