OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Developer Center

V4.4.2
  • Topics Overview
  • Overview
    • What is ODC?
    • Features
    • Architecture
    • Limitations
    • ODC console
  • Quick Start
    • Client ODC
      • Overview
      • Install Client ODC
      • Use Client ODC
    • Web ODC
      • Overview
      • Deploy Web ODC
      • Use Web ODC
  • Data Source Management
    • Create a data source
    • Data sources and project collaboration
    • Database O&M
      • Session management
      • Global variable management
      • Recycle bin management
  • SQL Development
    • Edit and execute SQL statements
    • Perform PL compilation and debugging
    • Use the command-line window
    • Edit and export the result set
    • Execution analysis
    • Generate test data
    • System settings
    • Intelligent SQL development
    • Common features
    • Database objects
      • Table objects
        • Overview
        • Create a table
      • View objects
        • Overview
        • Create a view
        • Manage views
      • Materialized view objects
        • Overview
        • Create a materialized view
        • Manage materialized views
      • Function objects
        • Overview
        • Create a function
        • Manage functions
      • Stored procedure objects
        • Overview
        • Create a stored procedure
        • Manage stored procedures
      • Sequence objects
        • Overview
        • Create a sequence
        • Manage sequences
      • Package objects
        • Overview
        • Create a program package
        • Manage program packages
      • Trigger objects
        • Overview
        • Create a trigger
        • Manage triggers
      • Type objects
        • Overview
        • Create a type
        • Manage types
      • Synonym objects
        • Overview
        • Create a synonym
        • Manage synonyms
      • External resource objects
        • External resources
        • Create an external resource
        • Manage external resources
  • Database Change Risk Management
    • Project collaborative management
      • Project management
      • Manage databases
      • Manage logical databases
      • Add object storage files
      • Manage project members
      • Desensitize data
      • Notification management
        • Overview
        • View notification records
        • Manage notification channels
          • Create a notification channel
          • View, edit, and delete a notification channel
          • Configure a custom channel
        • Manage notification rules
    • Manage user permissions
      • Users and roles
      • Automatic authorization
      • Apply for project permissions
      • Apply for database permissions
      • Apply table/view permissions
    • Security standards
      • Environment configuration
        • SQL check specifications
        • SQL window specification
      • Risk Management
        • Overview
        • Manage risk identification rules
        • Manage approval processes
      • Desensitization algorithms
      • Operation audit
  • Ticket Management
    • Import schemas and data
    • Export schemas and data
    • Database change management
    • Manage changes to logical databases
    • Batch database change management
    • Online schema changes
    • Synchronize shadow tables
    • Schema comparison
  • Data Lifecycle Management
    • Data archiving
    • Data cleanup
    • Manage partitioning plans
      • Manage partitioning plans
      • Set partitioning strategies
      • Examples of partitioning strategies
    • SQL Plan
  • System Integration
    • Login integration
    • Approval integration
    • SQL approval integration
    • Bastion host integration
    • Integrate with LLMs
  • Deployment Guide
    • Deployment overview
    • Preparations before deployment
    • Deploy ODC in single-node mode
    • Deploy ODC in high-availability mode
    • Deployment verification
  • Upgrade Guide
    • Upgrade Overview
    • Preparations for upgrade
    • Update single-node ODC
    • Update high-avaliability ODC
    • Upgrade verification
    • Rollback after upgrade failed
  • Best Practices
    • Tips for SQL development
    • Explore ODC team workspaces
    • Understanding real-time SQL diagnostics for OceanBase AP
    • OceanBase historical database solutions
    • ODC SQL check for automatic identification of high-risk operations
    • Integration with ODC enterprise-level account system
    • Manage and modify sharded databases and tables via ODC
    • Data masking and control practices
    • Enterprise-level control and collaboration: Safeguard every database change
  • Troubleshooting
    • ODC troubleshooting process
    • Collect message
      • View the runtime environment and version information
      • View web ODC logs
      • View client ODC logs
      • View end-to-end ODC-related logs
      • View ODC MetaDB data
      • Query the index status in OceanBase Database V4.x
      • Query the index status in OceanBase Database V1.4.x to V3.2.x
      • Collect JVM runtime information
      • Use tcpdump to capture packets
    • FAQ
      • Installation of client ODC
      • Web ODC deployment and startup
      • Connection Information
      • Command-line window
      • DDL statement display
  • Release Notes
    • V4.4
      • ODC V4.4.0
      • ODC V4.4.1
      • ODC V4.4.2
    • V4.3
      • ODC V4.3.4
      • ODC V4.3.3
      • ODC V4.3.2
      • ODC V4.3.1
      • ODC V4.3.0
    • V4.2
      • ODC V4.2.4
      • ODC V4.2.3
      • ODC V4.2.2
      • ODC V4.2.1
      • ODC V4.2.0
    • V4.1
      • ODC V4.1.3
      • ODC V4.1.2
      • ODC V4.1.1
      • ODC V4.1.0
    • V4.0
      • ODC V4.0.2
      • ODC V4.0.0
    • V3.4
      • ODC V3.4.0
    • V3.3
      • ODC V3.3.3
      • ODC V3.3.2
      • ODC V3.3.1
      • ODC V3.3.0
    • V3.2
      • ODC V3.2.3
      • ODC V3.2.2
      • ODC V3.2.1
      • ODC V3.2.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Developer Center
  3. V4.4.2

Upgrade verification

Last Updated:2026-10-09 03:24:19

Check the version
Data check for upgrade
Correct the data: Correct the status of the execution records
Hide data: Hide the migrated tasks
Check the history of logical database changes

Check the version

After you upgrade ODC, you can access Web ODC in a browser by using the IP address and port number of the host (the host where the Nginx proxy is deployed in a high-availability deployment) (http://IP:PORT or http://DOMAIN:PORT).

After you log in to ODC, select About ODC in the drop-down list in the upper-right corner of the Connections page. In the dialog box that appears, you can view the version number of the current application to determine whether the upgrade is successful. For more information about how to use Web ODC, see ODC User Guide (Web ODC).

Data check for upgrade

After the ODC version is upgraded, some periodic tasks may display different content due to the version iteration updates. You can log in to the metadata database and execute an SQL statement to correct the content. The specific procedure is as follows:

Correct the data: Correct the status of the execution records

During the migration of tasks, tasks in non-terminal states are all migrated to the CANCELED state. This causes the status of the task and the migrated task to be inconsistent. Run the following SQL statements to correct the status.

DELIMITER //

CREATE PROCEDURE batch_update_schedule_task()
BEGIN
    DECLARE batch_size INT DEFAULT 1000;
    DECLARE min_id BIGINT DEFAULT 0;
    DECLARE max_id BIGINT DEFAULT 0;
    DECLARE max_table_id BIGINT;
    DECLARE updated_rows INT DEFAULT 0;

    -- Obtain the maximum ID.
    SELECT IFNULL(MAX(id), 0) INTO max_table_id FROM schedule_task WHERE job_id < 0;

    my_loop: WHILE min_id < max_table_id DO
        SET max_id = min_id + batch_size;

        -- Execute the batch update.
        UPDATE schedule_task st
        JOIN (
            SELECT
                -fint.flow_instance_id AS job_id,
                tt.status AS task_status
            FROM flow_instance_node_task fint
            JOIN task_task tt ON tt.id = fint.task_task_id
            WHERE fint.flow_instance_id IN (
                SELECT -job_id
                FROM schedule_task WHERE job_id < 0
            )
        ) source_data ON st.job_id = source_data.job_id
        SET st.status = source_data.task_status
        WHERE st.status != source_data.task_status
              AND st.id > min_id
              AND st.id <= max_id;

        -- Optional: Obtain the number of affected rows, which is required for logging.
        -- SELECT ROW_COUNT() INTO updated_rows;

        SET min_id = max_id;
    END WHILE my_loop;
END //

DELIMITER ;

CALL batch_update_schedule_task();

Hide data: Hide the migrated tasks

In ODC versions earlier than V4.4.1, the subtasks of SQL plans and partitioning plans were database changes and displayed in the Database Change section of the ticket module. Now, these tasks are migrated to the Execution Records section of the job module. If you do not want to display historical data in the ticket module, run the following SQL statements to correct the data.

DELIMITER //

CREATE PROCEDURE batch_update_flow_instance_node_task()
BEGIN
    DECLARE batch_size INT DEFAULT 10000;
    DECLARE last_id BIGINT DEFAULT 0;
    DECLARE max_id BIGINT;

    SELECT MAX(id) INTO max_id FROM flow_instance_node_task;

    WHILE last_id < max_id DO
        -- SQL_PLAN
        UPDATE flow_instance_node_task fint
        JOIN task_task tt ON tt.id = fint.task_task_id
        SET fint.task_type = 'SQL_PLAN'
        WHERE tt.task_type = 'ASYNC'
          AND fint.flow_instance_id IN (
              SELECT -job_id 
              FROM schedule_task 
              WHERE job_group = 'SQL_PLAN' AND job_id < 0
          )
          AND fint.id > last_id AND fint.id <= last_id + batch_size;

        -- PARTITION_PLAN
        UPDATE flow_instance_node_task fint
        JOIN task_task tt ON tt.id = fint.task_task_id
        SET fint.task_type = 'PARTITION_PLAN'
        WHERE tt.task_type = 'ASYNC'
          AND fint.flow_instance_id IN (
              SELECT -job_id 
              FROM schedule_task 
              WHERE job_group = 'PARTITION_PLAN' AND job_id < 0
          )
          AND fint.id > last_id AND fint.id <= last_id + batch_size;

        SET last_id = last_id + batch_size;
    END WHILE;
END //

DELIMITER ;

CALL batch_update_flow_instance_node_task();

Check the history of logical database changes

After the upgrade, the historical data of logical database change tickets cannot be viewed. You can obtain the historical change data from the metadata database.

Prerequisites

  • You have installed the OBClient client. For more information, see Download OBClient.

Procedure

  1. Obtain the execution script.

  2. Log in to the server where the source database is located and run the script.

    $sh logical_db_view.sh
    
    Logical database change task information viewing tool
    
    Usage: luojiku.sh<command>[parameters...]
    
    Note: All IDs used in the commands are IDs in the schedule_schedule table.
    
    Commands:
    list                            List all logical database change tasks (the most recent 20).
    detail <schedule_id>            View the details of a task (the ID of the task is schedule_schedule.id).
    all <schedule_id>               View the execution status of all physical databases of a task.
    physical <schedule_id> <db_id>  View the details of the execution of a specified physical database.
    help                            Display this help information.
    
    Environment variables:
    ODC_DATABASE_HOST       Database host (default: localhost)
    ODC_DATABASE_PORT       Database port (default: 2883)
    ODC_DATABASE_NAME       Database name (default: odc)
    ODC_DATABASE_USERNAME   Database username (default: root)
    ODC_DATABASE_PASSWORD   Database password
    
    Example:
        logical_db_view.sh list
        logical_db_view.sh detail 123       # schedule_schedule.id = 123.
        logical_db_view.sh all 123
        logical_db_view.sh physical 123 456
    
    Note: This script uses the obclient client tool to connect to the OceanBase database.
    

    If the database connection error occurs, configure the environment variables to ensure that the database connection information is accurate.

    The environment variable configuration command is as follows. Fill in the actual metadata configuration information.

    export ODC_DATABASE_HOST=xx.xx.xx.xx
    export ODC_DATABASE_PORT=2883
    export ODC_DATABASE_NAME=odc
    export ODC_DATABASE_USERNAME=root
    export ODC_DATABASE_PASSWORD=********
    
  3. After the database connection is successful, run the following commands to view the historical data of logical database changes. Here are some common use cases.

    • List all logical database change tasks: sh logical_db_view.sh list.

    • View the details of a logical database change task: sh logical_db_view.sh detail 532.

    • View the execution status of a physical database: sh logical_db_view.sh all 532.

    • View the details of the execution of a physical database based on the physical database ID: sh logical_db_view.sh physical 532 55658.

Previous topic

Update high-avaliability ODC
Last

Next topic

Rollback after upgrade failed
Next
on this page
Check the version
Data check for upgrade
Correct the data: Correct the status of the execution records
Hide data: Hide the migrated tasks
Check the history of logical database changes