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 Migration Service

V4.2.9Community Edition

  • OMS Documentation
  • What's New
  • OMS Community Edition Introduction
    • What is OMS Community Edition?
    • Terms
    • OMS Community Edition HA
    • Architecture
      • Overview
      • Hierarchical functional system
      • Basic components
    • Limitations
  • Quick Start
    • Data migration process
    • Data synchronization process
  • Deploy OMS Community Edition
    • Deployment modes
    • System and network requirements
    • Memory and disk requirements
    • Prepare the environment
    • Deploy OMS Community Edition on a single node
    • Deploy OMS Community Edition on multiple nodes in a single region
    • Deploy OMS Community Edition on multiple nodes in multiple regions
    • Integrate the OIDC protocol into OMS Community Edition to implement SSO
    • Scale out OMS Community Edition
    • Check the deployment
    • Deploy a time-series database (Optional)
  • OMS Community Edition console
    • Log in to the console of OMS Community Edition
    • Overview
    • User center
      • Configure user information
      • Change your logon password
      • Log off
  • Data migration
    • Overview
    • Migrate data from a MySQL database to OceanBase Database Community Edition
    • Migrate data from HBase to OBKV
    • Migrate incremental data from OBKV to HBase
    • Migrate data from a Milvus database to OceanBase Database Community Edition
    • Migrate data from a Redis database to an OBKV-Redis database
    • Migrate data between tenants of OceanBase Database Community Edition
    • Migrate data in active-active disaster recovery scenarios
    • Migrate data from a TiDB database to OceanBase Database Community Edition
    • Migrate data from a PostgreSQL database to OceanBase Database Community Edition
    • Migrate data from Hive to OceanBase Database Community Edition
    • Migrate data from an ElasticSearch database to OceanBase Database Community Edition
    • Migrate data from a Qdrant database to OceanBase Database Community Edition
    • Manage data migration tasks
      • View details of a data migration task
      • Change the name of a data migration task
      • View and modify migration objects
      • Manage computing platforms
      • Use tags to manage data migration tasks
      • Perform batch operations on data migration tasks
      • Download and import settings of migration objects
      • Start and pause a data migration task
      • Release and delete a data migration task
    • Features
      • DML filtering
      • DDL synchronization
      • Configure matching rules for migration objects
      • Wildcard rules
      • Rename a database table
      • Use SQL conditions to filter data
      • Create and update a heartbeat table
      • Schema migration mechanisms
      • Schema migration operations
      • Set an incremental synchronization timestamp
      • Direct load
    • Supported DDL operations in incremental migration and limits
      • DDL synchronization from MySQL database to OceanBase Community Edition
        • Overview of DDL synchronization from a MySQL database to a MySQL-compatible tenant of OceanBase Database
        • CREATE TABLE
          • Create a table
          • Create a column
          • Create an index or a constraint
          • Create partitions
        • Data type conversion
        • ALTER TABLE
          • Modify a table
          • Operations on columns
          • Operations on constraints and indexes
          • Operations on partitions
        • TRUNCATE TABLE
        • RENAME TABLE
        • DROP TABLE
        • CREATE INDEX
        • DROP INDEX
        • DDL incompatibilities between MySQL database and OceanBase Community Edition
          • Overview
          • Incompatibilities of the CREATE TABLE statement
            • Incompatibilities of CREATE TABLE
            • Column types that are supported to create indexes or constraints
          • Incompatibilities of the ALTER TABLE statement
            • Incompatibilities of ALTER TABLE
            • Change the type of a constrained column
            • Change the type of an unconstrained column
            • Change the length of a constrained column
            • Change the length of an unconstrained column
            • Delete a constrained column
          • Incompatibilities of DROP INDEX operations
      • Supported DDL operations in incremental migration between MySQL-compatible tenants of OceanBase Database
  • Data synchronization
    • Data synchronization overview
    • Create a task to synchronize data from OceanBase Database Community Edition to a Kafka instance
    • Create a task to synchronize data from OceanBase Database Community Edition to a RocketMQ instance
    • Manage data synchronization tasks
      • View details of a data synchronization task
      • Change the name of a data synchronization task
      • View and modify synchronization objects
      • Use tags to manage data synchronization tasks
      • Perform batch operations on data synchronization tasks
      • Download and import the settings of synchronization objects
      • Start and pause a data synchronization task
      • Release and delete a data synchronization task
    • Features
      • DML filtering
      • DDL synchronization
      • Configure matching rules for synchronization objects
      • Rename a topic
      • Use SQL conditions to filter data
      • Column filtering
      • Data format description
  • Create and manage data sources
    • Create data sources
      • Create an OceanBase-CE data source
      • Create a MySQL data source
      • Create a TiDB data source
      • Create a Kafka data source
      • Create a RocketMQ data source
      • Create a PostgreSQL data source
      • Create an HBase data source
      • Create a Qdrant data source
      • Create a Milvus data source
      • Create a Redis data source
      • Create a Hive data source
      • Create an ElasticSearch data source
    • Manage data sources
      • View data source information
      • Copy a data source
      • Edit a data source
      • Delete a data source
      • Cache system views
    • Create a database user
    • User privileges
    • Enable binlogs for the MySQL database
  • OPS & Monitoring
    • O&M overview
    • Go to the overview page
    • Server
      • View server information
      • Update the quota
      • View server logs
    • Components
      • Store
        • Create a store
        • View details of a store
        • Update the configurations of a store
        • Start and pause a store
        • Delete a store
      • Incr-Sync
        • View details of an Incr-Sync component
        • Start and pause an Incr-Sync component
        • Migrate an Incr-Sync component
        • Update the configurations of an Incr-Sync component
        • Batch O&M
        • Delete an Incr-Sync component
      • Full-Import
        • View details of a Full-Import component
        • Pause a Full-Import component
        • Rerun and resume a Full-Import component
        • Update the configurations of a Full-Import component
        • Delete a Full-Import component
      • Full-Verification
        • View details of a Full-Verification component
        • Pause a Full-Verification component
        • Rerun and resume a Full-Verification component
        • Update the configurations of a Full-Verification component
        • Delete a Full-Verification component
      • Component parameters
        • Coordinator
        • Condition
        • Source Plugin
          • Overview
          • StoreSource
          • DataFlowSource
          • LogProxySource
          • KafkaSource (TiDB)
          • HBaseSource
          • HiveSource
          • ElasticSearchSource
        • Sink Plugin
          • Overview
          • JDBC-Sink
          • KafkaSink
          • DatahubSink
          • RocketMQSink
          • HBaseSink
          • HiveSink
        • Store parameters
          • Parameters of a MySQL store
          • Parameters of an OceanBase store
        • Parameters of the CM component
        • Parameters of the Supervisor component
        • Parameters of the Full-Verification component
    • O&M Task
      • View O&M tasks
      • Skip a task or subtask
      • Retry a task or subtask
  • System management
    • Permission Management
      • Overview
      • User management
      • Manage departments
    • Alert center
      • View task alerts
      • View system alerts
      • Manage alert settings
    • Associate with OCP
    • System parameters
      • Modify system parameters
      • Modify HA configurations
  • OMS Community Edition O&M
    • Manage OMS services
    • OMS logs
    • Component O&M
      • O&M operations for the Supervisor component
      • CLI-based O&M for the Connector component
      • O&M operations for the Store component
    • Component tuning
      • Incr-Sync or Full-Import tuning
    • Set throttling
  • Reference Guide
    • API Reference
      • Overview
      • CreateProject
      • StartProject
      • StopProject
      • ResumeProject
      • ReleaseProject
      • DeleteProject
      • ListProjects
      • DescribeProject
      • DescribeProjectSteps
      • DescribeProjectStepMetric
      • DescribeProjectProgress
      • DescribeProjectComponents
      • ListProjectFullVerifyResult
      • StartProjectsByLabel
      • StopProjectsByLabel
      • CreateMysqlDataSource
      • CreateMySQLMasterSlaveDataSource
      • CreateOceanBaseDataSource
      • ListDataSource
      • CreateLabel
      • ListAllLabels
      • ListFullVerifyInconsistenciesResult
      • ListFullVerifyCorrectionsResult
      • UpdateStore
      • UpdateFullImport
      • UpdateIncrSync
      • UpdateFullVerification
    • OMS error codes
    • Alert Reference
      • oms_host_down
      • oms_host_down_migrate_resource
      • oms_host_threshold
      • oms_migration_failed
      • oms_migration_delay
      • oms_sync_failed
      • oms_sync_status_inconsistent
      • oms_sync_delay
    • Telemetry parameters
  • Upgrade Guide
    • Overview
    • Upgrade OMS Community Edition in single-node deployment mode
    • Upgrade OMS Community Edition V4.2.9-CE
    • Upgrade the CDC library
    • FAQ
  • FAQ
    • General O&M
      • How do I modify the resource quotas of an OMS container?
      • Clear files in the Store component
      • How do I troubleshoot the OMS server down issue?
      • Deploy InfluxDB for OMS
      • Increase the disk space of the OMS host
    • Task diagnostics
      • What do I do when a store does not have data of the timestamp requested by the downstream?
      • What do I do when OceanBase Store failed to access an OceanBase cluster through RPC?
    • OPS & monitoring
      • What are the alert rules?
    • Data synchronization
      • FAQ about synchronization to a message queue
        • What are the strategies for ensuring the message order in incremental data synchronization to Kafka
      • Performance troubleshooting and tuning for data synchronization from OceanBase Community Edition to Kafka
    • Data migration
      • Full migration
        • How do I query the ID of a checker?
        • How do I query log files of the Checker component of OMS?
        • How do I query the verification result files of the Checker component of OMS?
        • What do I do if the destination table does not exist?
        • What can I do when the full migration failed due to LOB fields?
        • What do I do if garbled characters cannot be written into OceanBase Database V3.1.2?
      • Incremental synchronization
        • How do I skip DDL statements?
        • How do I update whitelists and blacklists?
        • What are the application scope and limits of ETL?
    • Logon and password
      • What do I do if my logon password is locked?
    • Installation and deployment
      • How do I upgrade Store?
      • How do I upgrade CDC?
      • What do I do when the "Failed to fetch" error is reported?
      • Change port numbers for components
      • Switching between the primary and standby OMS MetaDBs

Download PDF

OMS Documentation What's New What is OMS Community Edition? Terms OMS Community Edition HA Overview Hierarchical functional system Basic components Limitations Data migration process Data synchronization process Deployment modes System and network requirements Memory and disk requirements Prepare the environment Deploy OMS Community Edition on a single node Deploy OMS Community Edition on multiple nodes in a single region Deploy OMS Community Edition on multiple nodes in multiple regions Integrate the OIDC protocol into OMS Community Edition to implement SSO Scale out OMS Community Edition Check the deployment Deploy a time-series database (Optional) Log in to the console of OMS Community Edition Overview Configure user information Change your logon password Log off Overview Migrate data from a MySQL database to OceanBase Database Community Edition Migrate data from HBase to OBKV Migrate incremental data from OBKV to HBase Migrate data from a Milvus database to OceanBase Database Community Edition Migrate data from a Redis database to an OBKV-Redis database Migrate data between tenants of OceanBase Database Community Edition Migrate data in active-active disaster recovery scenarios Migrate data from a TiDB database to OceanBase Database Community Edition Migrate data from a PostgreSQL database to OceanBase Database Community Edition Migrate data from Hive to OceanBase Database Community Edition Migrate data from an ElasticSearch database to OceanBase Database Community Edition Migrate data from a Qdrant database to OceanBase Database Community Edition View details of a data migration task Change the name of a data migration task View and modify migration objects Manage computing platforms Use tags to manage data migration tasks Perform batch operations on data migration tasks Download and import settings of migration objects Start and pause a data migration task Release and delete a data migration task DML filtering DDL synchronization Configure matching rules for migration objects Wildcard rules Rename a database table Use SQL conditions to filter data Create and update a heartbeat table Schema migration mechanisms Schema migration operations Set an incremental synchronization timestamp Direct load Supported DDL operations in incremental migration between MySQL-compatible tenants of OceanBase Database Data synchronization overview Create a task to synchronize data from OceanBase Database Community Edition to a Kafka instance Create a task to synchronize data from OceanBase Database Community Edition to a RocketMQ instance View details of a data synchronization task Change the name of a data synchronization task View and modify synchronization objects Use tags to manage data synchronization tasks Perform batch operations on data synchronization tasks Download and import the settings of synchronization objects Start and pause a data synchronization task Release and delete a data synchronization task DML filtering DDL synchronization Configure matching rules for synchronization objects Rename a topic Use SQL conditions to filter data Column filtering Data format description Create an OceanBase-CE data source Create a MySQL data source Create a TiDB data source Create a Kafka data source Create a RocketMQ data source Create a PostgreSQL data source Create an HBase data source Create a Qdrant data source Create a Milvus data source Create a Redis data source Create a Hive data source Create an ElasticSearch data source View data source information Copy a data source Edit a data source Delete a data source Cache system views Create a database user User privileges Enable binlogs for the MySQL database O&M overview
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 Migration Service
  3. V4.2.9
iconOceanBase Migration Service
V 4.2.9Community Edition
Enterprise Edition
  • V 4.3.2
  • V 4.3.1
  • V 4.3.0
  • V 4.2.5
  • V 4.2.4
  • V 4.2.3
  • V 4.0.2
  • V 3.4.0
Community Edition
  • V 4.2.13
  • V 4.2.12
  • V 4.2.11
  • V 4.2.10
  • V 4.2.9
  • V 4.2.8
  • V 4.2.7
  • V 4.2.6
  • V 4.2.5
  • V 4.2.4
  • V 4.2.3
  • V 4.2.1
  • V 4.2.0
  • V 4.0.0
  • V 3.3.1

Migrate data from a TiDB database to OceanBase Database Community Edition

Last Updated:2026-04-14 07:36:10  Updated
share
What is on this page
Background information
Prerequisites
Limitations
Considerations
Data type mappings
Procedure
References

folded

share

This topic describes how to use OceanBase Migration Service (OMS) Community Edition to migrate data from a TiDB database to OceanBase Database Community Edition.

Background information

The OMS Community Edition allows you to create a data migration task to migrate data from a source TiDB database to a target OceanBase Community Edition database. You can seamlessly migrate the business data and incremental data from the source database to OceanBase Community Edition through schema migration, full migration, and incremental synchronization.

The TiDB database is a converged distributed database, which supports Hybrid Transactional and Analytical Processing (HTAP). If you use a TiDB database of a version earlier than V4.x, select Bind Kafka Data Source when you create a TiDB data source. If you use a TiDB database of V4.x or later, you can leave Bind Kafka Data Source unselected and synchronize incremental data from the TiDB database to OceanBase Community Edition by using OMS Community Edition solely.

If you select Bind Kafka Data Source when you create a TiDB data source, you also need to deploy a TiCDC cluster and a Kafka cluster to synchronize incremental data from the TiDB database to OceanBase Community Edition. If incremental synchronization is not required for the data migration task, you do not need to deploy a TiCDC cluster and a Kafka cluster.

architecture8-zh

TiCDC is a tool used to synchronize incremental data of the TiDB database. The PD cluster, which is deployed to implement high availability, is the scheduling module of the TiDB cluster and generally consists of three PD nodes. The TiKV server sends change data to the TiCDC cluster in the form of change logs. The TiCDC tool synchronizes data to the Kafka cluster after it obtains data from multiple TiCDC processes and processes the data. The Kafka cluster stores the incremental logs converted by the TiCDC tool from the TiDB database, so that OMS can obtain the corresponding data from the Kafka cluster and real-time migrate the data to OceanBase Community Edition during incremental data synchronization.

Prerequisites

You have created dedicated database users in the source TiDB database and the target OceanBase Community Edition database for the data migration task and granted corresponding privileges to the users. For more information, see Create a database user.

Limitations

  • At present, TiDB Database V2.x, V3.x, V4.x, V5.x, V6.x, V7.x, and V8.x are supported.

    Notice

    TiDB Database V2.x and V3.x support only TiDB Binlog.

  • If the target is a database, the OMS Community Edition does not support triggers in the target database. If triggers exist in the target database, the data migration may fail.

  • When you migrate data from a TiDB database to OceanBase Community Edition, DDL synchronization is not supported.

  • The OMS Community Edition does not support the migration of tables without primary keys or data containing spaces to OceanBase Community Edition.

  • Data source identifiers and user accounts must be globally unique in OMS.

  • OMS only supports migrating databases, tables, and column objects with ASCII-compliant names that do not contain special characters (|"'`()=;/& and newline characters).

  • The OMS Community Edition supports only the TiCDC open protocol and does not support other protocols. If you use an unsupported protocol, a JDBC-Connector error will be returned, indicating a null pointer exception.

  • Make sure that enable-old-value = true is added in the configuration for synchronizing data to the Kafka cluster. Otherwise, the message format of data synchronization may be abnormal. For more information, see Description of synchronization tasks.

Considerations

  • We recommend that you migrate no more than 1,000 tables at a time to avoid impact on the data migration task.

  • If there are multiple foreign keys with the same name in the source, an error is returned during schema migration. You can change the foreign key constraint names and resume the task.

  • If the source character set is UTF-8, we recommend that you use a compatible character set, such as UTF-8 or UTF-16, for the destination to avoid issues like garbled text due to character set incompatibility.

  • During reverse incremental migration from a TiDB database to OceanBase Community Edition V3.2.x or earlier, if the source table is a multi-partition table with a global unique index and you update the values of the partitioning key, data may be lost during migration.

  • Do not write data to the topic synchronized by TiCDC. Otherwise, the JDBC-Connector may fail with an error indicating a null pointer exception.

  • Make sure that the migration precision for columns of the DECIMAL, FLOAT, or DOUBLE data type meets your requirements in OMS Community Edition. If the precision of the target column type is less than that of the source column type, the data may be truncated, resulting in inconsistent data between the source and target.

  • If you change the target unique index, you must restart the incremental synchronization component. Otherwise, inconsistent data may be returned.

  • If the clocks between nodes or between the client and the server are out of synchronization, the latency may be inaccurate during incremental synchronization or reverse incremental migration.

    For example, if the clock is earlier than the standard time, the latency can be negative. If the clock is later than the standard time, the latency can be positive.

  • Take note of the following points if you want to perform data consolidation between a database and a table:

    • We recommend that you map the schemas of the source and destination databases by using import objects or matching rules.

    • We recommend that you manually create schemas in the destination database. If you use OMS to create schemas, skip failed objects in the schema migration step.

  • If the source and destination table schemas are inconsistent, inconsistent data may be returned. Some known scenarios are described as follows:

    • When users manually create table schemas in the destination database, implicit conversion may occur because the data types of columns in the destination table are not supported by OMS. As a result, the data types of the columns in the source and destination tables are inconsistent.

    • If the length of a column in the destination table is shorter than that in the source table, the data in the column may be truncated, resulting in inconsistent data between the source and destination tables.

  • Take note of the following points if you want to migrate data from a TiDB database of a version earlier than V4.0:

    • TiDB Binlog does not send heartbeats. If no updates are made in the source database, the data timestamp will not be updated.

    • If no updates are made in the source database before the start of incremental synchronization, the task will fail and return the data not existed error.

    • For a table without a primary key, TiDB Binlog cannot obtain the other unique keys. The system treats all fields as the primary key. When an update operation is performed on the source table, it is deleted and inserted in the destination table.

  • If you select only Incremental Synchronization when you create a data migration task, the local incremental logs in the source database must be retained for more than 48 hours.

    ​​​If you select Full Migration + Incremental Synchronization when you create a data migration task, the local incremental logs in the source database must be retained for at least seven days. Otherwise, the data migration task may fail or the data in the source and destination databases may be inconsistent because OMS cannot obtain incremental logs.

Data type mappings

TiDB Database OceanBase Database Community Edition
INTEGER INTEGER
TINYINT TINYINT
MEDIUMINT MEDIUMINT
BIGINT BIGINT
SMALLINT SMALLINT
DECIMAL DECIMAL
NUMERIC NUMERIC
FLOAT FLOAT
REAL REAL
DOUBLE PRECISION DOUBLE PRECISION
BIT BIT
CHAR CHAR
VARCHAR VARCHAR
BINARY BINARY
VARBINARY VARBINARY
BLOB BLOB
TEXT TEXT
ENUM ENUM
SET SET
DATE DATE
DATETIME DATETIME
TIMESTAMP TIMESTAMP
TIME TIME
YEAR YEAR

Procedure

  1. Create a data migration task.

    1. Log in to the OMS Community Edition console.

    2. In the left-side navigation pane, click Data Migration.

    3. On the Data Migration page, click New Task in the upper-right corner.

  2. On the Select Source and Target page, configure the parameters.

    Parameter Description
    Task Name We recommend that you use a name that contains Chinese characters, numbers, and letters. The name cannot contain spaces and must be 64 characters or less in length.
    Tags (Optional) Click the field and select a tag from the drop-down list. You can also click Manage Tags to create, modify, or delete a tag. For more information, see Use tags to manage data migration tasks.
    Source If you have created a TiDB data source, you can select one from the drop-down list. If none exist, click New Data Source in the drop-down list and configure the settings in the dialog box that appears. For more information, see Create a TiDB data source.
    Note:
    • If no valid Kafka data source or topic information is bound to the source TiDB data source, incremental synchronization is not supported.
    • If consumer authentication control is enabled for the Kafka server, add properties={"group.id":"The consumer group of your user environment. OMS Community Edition default is oms_jdbc_connector_null"} to the source field of the incremental synchronization task.
    Destination If you have created an OceanBase Community Edition data source, you can select one from the drop-down list. If none exist, click New Data Source in the drop-down list and configure the settings in the dialog box that appears. For more information, see Create an OceanBase Community Edition data source.
  3. Click Next.

  4. In the dialog box that appears, click Noted.

    Note that full data migration and verification of tables without primary keys or tables with non-null unique indexes are supported, but not incremental synchronization.

  5. On the Select Migration Type page, configure the parameters.

    In the Migration Type drop-down list, the values are Schema Migration, Full Migration, Incremental Synchronization, Full Verification, and Reverse Increment.

    Migration Type Description
    Schema Migration After you select this option, OMS Community Edition migrates data objects such as tables, indexes, constraints, comments, and views from the source database to the destination database. Temporary tables are automatically filtered..
    • Manual Table Schema Adjustment Required: OMS Community Edition allows you to customize the schema of tables. If you select this option, OMS Community Edition only retrieves the schema SQL statements in the schema migration phase and starts to execute the statements only after you modify them.
    • Target Table Storage Type: This parameter is displayed only when you have selected Schema Migration and the source data is from a TiDB database of a version earlier than V4.3.0. For more information about this parameter, see default_table_store_format. The parameter determines the storage type of table objects in the destination database during schema migration or incremental synchronization.

      Note

      The Default value is adaptively determined based on the parameters of the destination. It specifies the storage type for table objects in the destination.

    Full Migration After you select this option, OMS Community Edition migrates the existing data in the tables of the source TiDB database to the corresponding tables in the destination OceanBase Community Edition database. Before you migrate data to an OceanBase Community Edition database from a TiDB database, we recommend that you run the ANALYZE statement to collect statistics about the TiDB database.
    Incremental Synchronization After you select this option, OMS Community Edition synchronizes the data that is added, modified, or deleted in the source database to the corresponding tables in the destination database.
    The Incremental Synchronization parameter DML Synchronization supports the values Insert, Delete, and Update, and you can select the required types.
    If you use a TiDB database of a version earlier than V4.x and have not bound a Kafka data source when you create the source TiDB data source, you cannot select this option.
    Full Verification After full migration is completed and incremental data is synchronized to the destination database and is on par with the source data, OMS Community Edition automatically initiates a full data verification task for the source and destination tables.
    • If you select Full Verification, we recommend that you collect statistics about the source and destination TiDB databases before the full verification starts. For more information about how to collect statistics in an OceanBase Community Edition database, see Manually collect statistics.
    • If you select Incremental Synchronization, and have not selected all DML operations in DML Synchronization, OMS Community Edition does not support full data verification in this scenario.
    Reverse Increment After this option is selected, OMS Community Edition can synchronize the changes in the destination database to the source database in real time after the business switch. In the following cases, you cannot select this option:
    • Data converges in multiple tables.
    • Multiple schemas map to one schema.
  6. (Optional) Click Next. If you have selected Reverse Increment, and the OceanBase Community Edition data source at the destination does not have a configured URL, a username, or a password, the More about Data Sources dialog box appears, reminding you to configure the parameters. For more information, see Create an OceanBase Community Edition data source.

    Complete the configuration and click Test connectivity. If the connection is successful, click Save.

  7. Click Next. On the Select Migration Objects page, select the migration objects and scope.

    You can select the migration objects through the Specify Objects or Match Rules option. This topic introduces the procedure for selecting migration objects through the Specify Objects option. For more information about how to configure matching rules, see Configure matching rules for migration objects.

    Notice

    • The name of a table to be migrated and the names of columns in the table must not contain Chinese characters.

    • If the name of a database or table contains double dollar signs ($$), the data migration task cannot be created.

    1. In the Select Migration Objects section, select Specify Objects.

    2. In the Specify Migration Scope section, select the Source Object(s) list. You can select one or more databases and tables as migration objects.

    3. Click > to add the selected objects to the Target Object(s) list.

    OMS Community Edition allows you to import objects by using a text file, rename objects, and remove one or all migration objects.

    Operation Steps
    Import Objects
    1. In the right-side list of the Specify Migration Scope area, click Import Objects in the upper-right corner.
    2. In the dialog box, click OK.
      Note:
      The import will overwrite previous operation selections, so proceed with caution.
    3. In the Import Migration Objects dialog box, import the objects that need to be migrated.
      You can perform operations such as renaming database tables by importing a CSV file. For more information, see Download and Import Migration Object Settings.
    4. Click Validate.
    5. After passing the legality validation, click OK.
    Rename OMS Community Edition allows you to rename migration objects. For more information, see Rename a database or table.
    Remove/Remove all OMS Community Edition allows you to remove one or all selected objects at the target.
    • Remove a migration object
      Hover the pointer over the target object in the right-side list of the Specify Migration Scope section, and click Remove in the drop-down list.
    • Remove all migration objects
      Click Remove All in the upper-right corner of the right-side list of the Specify Migration Scope section. In the dialog box that appears, click OK.
  8. Click Next. On the Migration Type page, configure the parameters.

    If you want to view or modify the parameters of the full migration or incremental synchronization component, click Full Migration or Incremental Synchronization and then click Configuration Details in the upper-right corner of the component. For more information about the parameters, see Component parameters.

    • Full Migration

      On the Select Migration Type page, you can select Full Migration to display the following parameters.

      Parameter Description
      Concurrency Valid values: Stable, Normal, Fast, and Custom. The resources required for a full migration task vary with the performance of full migration. If you set the value of the Custom parameter to Custom, you can set the Read Concurrency, Write Concurrency, and JVM Memory parameters according to your business requirements.
      Handling strategy when target objects exist Valid values: Ignore and Stop Migration:
      • If you set the value to Ignore, OMS Community Edition writes data to a target table only when the original data and the data to be written do not conflict. In the case of a conflict, OMS Community Edition logs the conflicting data and retains the original data.

        Notice

        If you select Ignore, the IN mode is used to pull data during full verification, which cannot detect cases where the target contains data not present in the source, and the verification performance will be degraded to some extent.

      • If you set the value to Stop Migration, OMS Community Edition returns an error if the target table contains data during full migration. You must remove the data in the target before you continue the migration.

        Notice

        If you click Restore after an error occurs, OMS Community Edition will ignore this setting and continue to migrate table data. Proceed with caution.

      Write Method Valid values: SQL and Direct Load. For more information about Direct Load, see Overview.
      Allow Index Postponement Specifies whether to create indexes after full data migration. Index postponement can shorten the full migration time. For more information about how to set this parameter, see the following Considerations.

      Notice

      You must select both Schema Migration and Full Migration on the Migration Type page to set this parameter.

      If you allow index postponement, we recommend that you adjust the parameters based on the hardware conditions of OceanBase Community Edition and the current business traffic.

      • If you use OceanBase Community Edition V4.x, use the CLI tool to adjust the following sys tenant parameters and business tenant parameters.

        • Adjust sys tenant parameters

          // parallel_servers_target specifies the number of parallel query queues on each server.
          // If you want to improve performance, you can set this parameter to a value greater than the number of physical CPU cores, for example, 1.5 times the number of cores. The value you set cannot exceed 64 to avoid deadlocks in the OceanBase Community Edition kernel.
          set global parallel_servers_target = 64;
          
        • Adjust business tenant parameters

          // _temporary_file_io_area_size specifies the file memory buffer size.
          alter system set _temporary_file_io_area_size = '10' tenant = 'xxx';
          // Set sys_bkgd_net_percentage to 100 to disable throttling in 4.x.
          alter system set sys_bkgd_net_percentage = 100;
          
      • If you use OceanBase Community Edition V3.x, use the CLI tool to adjust the following sys tenant parameters.

        // parallel_servers_target specifies the number of parallel query queues on each server.
        // If you want to improve performance, you can set this parameter to a value greater than the number of physical CPU cores, for example, 1.5 times the number of cores. The value you set cannot exceed 64 to avoid deadlocks in the OceanBase Community Edition kernel.
        set global parallel_servers_target = 64;
        // data_copy_concurrency specifies the maximum number of concurrent data migration replication tasks executed in the system.
        alter system set data_copy_concurrency = 200;
        
    • Incremental Synchronization

      On the Select Migration Type page, you can select Incremental Synchronization to display the following parameters.

      Parameter Description
      Concurrency Valid values: Stable, Normal, Fast, and Custom. The resources required for an incremental synchronization task vary with the performance of incremental synchronization. If you set the value of the Custom parameter to Custom, you can set the Read Concurrency, Write Concurrency, and JVM Memory parameters according to your business requirements.
      Time to Keep Incremental Records This parameter is displayed only when you have not selected Bind Kafka Data Source for the newly created TiDB data source. It specifies the retention period of incremental parsing files in OMS Community Edition. The longer the retention period, the more disk space in the OMS Community Edition store component is consumed.
      Start Point of Incremental Synchronization
      • This parameter is not displayed if you have selected Full Migration.
      • If you have not selected Full Migration but have selected Incremental Synchronization without selecting Bind Kafka Data Source when you create the TiDB data source, you can specify the start point of incremental synchronization for data migrated after a specific point in time. The default value is the current system time. For more information, see Set the start point of incremental synchronization.
      Kafka Group.id (Optional) This parameter is displayed only when you have selected Bind Kafka Data Source for the newly created TiDB data source. group.id uniquely identifies a consumer group in Kafka.
    • Full Verification

      On the Select Migration Type page, you can select Full Verification to display the following parameters.

      Parameter Description
      Concurrency Valid values: Stable, Normal, Fast, and Custom. The resources required for the full verification component Full-Verification are limited by the parameter configurations, which can limit the resource consumption of the full verification phase. If you set the value of the Custom parameter to Custom, you can set the Read Concurrency, Write Concurrency, and JVM Memory parameters according to your business requirements.
  9. Click Precheck to perform a precheck on the data migration task.

    In the Precheck step, OMS Community Edition checks whether the database user has the read/write permissions and whether the database connection is normal. The data migration task will not be started unless all checks pass. If the precheck fails:

    • You can troubleshoot the issues and re-run the precheck until it succeeds.

    • You can also click Skip in the operation column of the failed precheck item. A dialog box will appear, showing the impact of skipping the operation. After you confirm the skip, click OK in the dialog box.

  10. Click Start Task. If you do not want to start the task immediately, you can click Save to go to the details page of the data migration task, where you can start the task later.

    OMS Community Edition allows you to modify the migration objects during a data migration task. For more information, see View and modify migration objects. After you start a data migration task, it will go through the selected migration phases in order. For more information, see View details of a data migration task in the View Migration Details section.

References

  • Create a TiDB data source

  • Create an OceanBase-CE data source

  • Component parameters

  • View and modify migration objects

  • View details of a data migration task

Previous topic

Migrate data in active-active disaster recovery scenarios
Last

Next topic

Migrate data from a PostgreSQL database to OceanBase Database Community Edition
Next
What is on this page
Background information
Prerequisites
Limitations
Considerations
Data type mappings
Procedure
References