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

V4.2.10Community 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 deployment
    • 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 OceanBase Database Community Edition to an ElasticSearch database
    • Migrate data from a MongoDB 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
      • Create a MongoDB 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 component
        • View details of a Store component
        • Update the configurations of a Store component
        • Start and pause a Store component
        • Delete a Store component
      • 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
          • MongoDBSource
        • 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
      • Manage users
      • 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 in single-node deployment mode
    • Upgrade in multi-node deployment mode
    • 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?
        • Garbled characters in the Latin1 character set
        • What do I do if the target 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?
      • 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 deployment 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 OceanBase Database Community Edition to an ElasticSearch database Migrate data from a MongoDB 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 Create a MongoDB 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
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.10
iconOceanBase Migration Service
V 4.2.10Community 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.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:11  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

OMS Community Edition allows you to create a data migration task from a source TiDB database to a target OceanBase database. You can migrate the existing business data and incremental data from the source database to OceanBase Database by using 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 want to perform incremental synchronization, select Bind Kafka Data Source when you create a TiDB data source.

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 database users for the source TiDB database and the target OceanBase database to migrate data, and granted the required permissions to the users. For more information, see Create a database user.

Limitations

  • The supported TiDB versions are V2.x, V3.x, V4.x, V5.x, V6.x, V7.x, and V8.x. The supported Kafka versions are V0.9, V1.0, and V2.x.

    Notice

    Only TiDB Binlog is supported for TiDB V2.x and V3.x.

  • 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 the TiDB database to OceanBase Database, DDL synchronization is not supported.

  • Tables without a primary key cannot be synchronized from a TiDB database to OceanBase Database Community Edition.

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

  • OMS Community Edition supports only migration of databases, tables, and columns whose names are ASCII characters and do not contain special characters (including line breaks, spaces, and |"'`()=;/&).

  • OMS Community Edition only supports TiCDC Open Protocol. If you use other protocols, an exception will be thrown, and a null pointer error will occur.

  • Make sure that enable-old-value=true is added to the configuration for synchronizing data from TiCDC to Kafka. Otherwise, data synchronization messages may be in an abnormal format. For more information, see Description of the configuration file for a synchronization task.

Considerations

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

  • If the source database has foreign keys with the same names, an error will be reported during schema migration. You can modify the foreign key constraint name and then resume the 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 Latin1, for more information about garbled characters, see Garbled characters in the Latin1 character set.

  • During reverse increment 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 precision of columns such as DECIMAL, FLOAT, or DOUBLE is migrated as expected. If the precision of a target column is smaller than that of the corresponding source column, data truncation may occur, which results in inconsistent data between the source and target.

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

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

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

  • In multi-table aggregation scenarios:

    • We recommend that you configure the mappings between the source and target databases by importing objects or specifying matching rules.

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

  • A difference between the source and target table schemas may result in data consistency. Some known scenarios are described as follows:

    • When you manually create a table schema, if the data type of a column in the source is not supported by OMS Community Edition, implicit data type conversion may occur, which causes inconsistent column types between the source and target databases.

    • If the length of a column in the target database is shorter than that in the source database, the data of this column may be automatically truncated, which causes data inconsistency between the source and target databases.

  • When you use TiDB Database V2.x, V3.x, or V4.x, note the following points. For more information about TiDB Binlog, see TiDB Binlog Cluster Overview.

    • 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 target table.

    • Set source.cdcDataFormat=tidbBinlog in the Incr-Sync component to use the tidbBinlog data format.

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

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

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 Create Task in the upper-right corner.

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

    Parameter Description
    Migration Task Name We recommend that you use a combination of Chinese characters, numbers, and English letters. The name must be 64 characters in length or less and must not contain spaces.
    Tag (Optional) Click the field and select the target tag from the drop-down list. You can also click Manage Tags to create, modify, or delete a tag. For more information, see Manage data migration tasks by using tags.
    Source If you have created a TiDB data source, select it from the drop-down list. If not, click New Data Source in the drop-down list and create a data source in the dialog box that appears. For more information, see Create a TiDB data source.
    Note:
    • When the TiDB data source is not bound to a valid Kafka data source and topic, incremental synchronization is not supported.
    • If consumer authentication is enabled for the Kafka server, specify properties={"group.id":"Consumer (OMS Community Edition default is oms_jdbc_connector_null)"}" in the source of the incremental synchronization task configuration.
    Target If you have created an OceanBase Community Edition data source, select it from the drop-down list. If not, click New Data Source in the drop-down list and create a data source in the dialog box that appears. For more information, see Create an OceanBase-CE data source.
  3. Click Next.

  4. Click Noted in the message that appears.

    Please note that full migration and full verification are supported for tables without primary keys or tables with non-null unique indexes in TiDB databases, but incremental synchronization is not supported.

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

    Migration Type includes Schema Migration, Full Migration, Incremental Synchronization, Full Verification, and Reverse Increment.

    Migration Type Description
    Schema Migration After a schema migration task is created, OMS Community Edition migrates the data object definitions (tables, indexes, constraints, comments, and views) in the source database to the target database and automatically filters temporary tables.
    • Manual Table Schema Adjustment Required: OMS Community Edition allows you to customize the table schema. If you select this option, OMS Community Edition only obtains the table schema SQL file during the schema migration phase. After you modify the schema, OMS Community Edition starts the migration.
    • Target Table Storage Type: If the OceanBase Community Edition version of the target database is V4.3.0 or later, and you select Schema Migration, this parameter is displayed.
      The target table object storage type can be Default, Row Storage, Column Storage, or Hybrid Row-Column Storage. This parameter specifies the storage type of the target table objects during schema migration or incremental synchronization. For more information, see default_table_store_format.

      Note

      The Default option is adaptive to other options based on the target parameters. This option specifies the storage type of the table objects during schema migration.

    Full Migration After a full migration task is created, OMS Community Edition migrates the existing data in the source database tables to the corresponding tables in the target database. If you select Full Migration, we recommend that you run the ANALYZE statement to collect statistics on the TiDB database before you migrate data.
    Incremental Synchronization After an incremental synchronization task is created, OMS Community Edition synchronizes the data that changes in the source database (new data, modified data, and deleted data) to the corresponding tables in the target database.
    Incremental Synchronization specifies DML Synchronization operations, which include Insert, Delete, and Update. You can select the required DML operation. For more information, see DML filtering.
    If you use a version earlier than V4.x of TiDB, you cannot select Incremental Synchronization if you do not bind a Kafka data source when you create the TiDB data source.
    Full Verification After full migration is completed and incremental data is synchronized to the target database and is approximately synchronized with the source database, OMS Community Edition automatically initiates a full data verification task to verify the data tables in the source database and the target database.
    • If you select Full Verification, we recommend that you collect statistics on the TiDB database and OceanBase Community Edition before the full verification task is created. For more information, see Manually collect statistics.
    • If you select Incremental Synchronization and do not select all DML operations in DML Synchronization, OMS Community Edition does not support full data verification in this scenario.
    Reverse Increment After a reverse increment task is created, OMS Community Edition can synchronize the changes that occur in the target database after business switching to the source database. OMS Community Edition does not support the Reverse Increment option in the following scenarios:
    • Multi-table aggregation is involved.
    • Mutiple source schemas is mapped to one target schema.
  6. (Optional) Click Next. If you select Reverse Increment and the OceanBase Community Edition data source of the target database is not configured with Configurl, the username, and the password of the DRC user, the More about Data Sources dialog box appears, prompting you to configure the parameters. For more information, see Create an OceanBase-CE data source.

    After you configure the parameters, click Test connectivity. If the test succeeds, click Save.

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

    You can select the migration object in two ways: Specify Objects and Match Rules. This topic describes how to select the migration object in the Specify Objects mode. For more information about how to configure matching rules, see Configure matching rules for migration objects.

    Note

    • 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 a table contains the double dollar sign ($$), 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 migration object in the Source Object(s) list. You can select one or more tables or views in one or more databases as the migration object.

    3. Click > to add the migration object to the Target Object(s) list.

    OMS Community Edition allows you to import objects, rename objects, and remove objects.

    Operation Procedure
    Import objects
    1. In the Specify Migration Scope section, click Import Objects in the upper-right corner of the right-side list.
    2. In the dialog box that appears, click OK.
      Note:
      Importing objects will overwrite the previous operation selection. Proceed with caution.
    3. In the Import Migration Object dialog box, import the migration object.
      You can rename a database or a table by importing a CSV file. For more information, see Download and import the migration object configuration.
    4. Click Validate.
    5. After the object is verified, click OK.
    Rename objects OMS Community Edition allows you to rename the migration object. For more information, see Rename a database or a table.
    Remove/Remove All OMS Community Edition allows you to remove one or more objects temporarily selected for the target database during data mapping.
    • Remove a single migration object
      In the right-side list of the Specify Migration Scope section, hover over the target object and click Remove to remove the migration object.
    • Remove all migration objects
      In the right-side list of the Specify Migration Scope section, click Remove All in the upper-right corner. In the dialog box that appears, click OK to remove all migration objects.
  8. Click Next. On the Migration Type page, configure the parameters.

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

    • Full migration

      The following parameters are displayed only if you select Full Migration on the Select Migration Type page.

      Parameter Description
      Concurrency The concurrency mode can be Stable, Normal, Fast, or Custom. The performance of full migration varies depending on the concurrency mode. The resources required for full migration tasks vary depending on the concurrency mode. If you select Custom, you can set Read Concurrency, Write Concurrency, and JVM Memory as needed.
      Target Object Existence Handling Strategy The handling strategy can be Ignore or Stop Migration:
      • If you select Ignore, when the target table object contains data, OMS Community Edition writes data to the target table object, and records the conflicting data in the log file.

        Notice

        If you select Ignore, full verification uses the IN mode to pull data, and cannot verify the data that exists in the target but does not exist in the source. The verification performance will be degraded to a certain extent.

      • If you select Stop Migration, when the target table object contains data, full migration will report an error indicating that the migration is not allowed. Please handle the data in the target database and then continue the migration.

        Notice

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

      Write Mode The write mode can be SQL (data is written to the table by using the INSERT or REPLACE statement) or Direct Load (data is written to the table by using direct load). For more information about direct load, see Overview of direct load.
      Allow Index Postponement You can set whether to create indexes after full data migration. Index postponement shortens the full migration time. If you select index postponement, note the following items.

      Notice

      To enable this option, you must select both Schema Migration and Full Migration on the Select Migration Type page.

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

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

        • Adjust the sys tenant parameters

          // parallel_servers_target specifies the number of parallel queries per server.
          // If you want to ensure performance, we recommend that you set this parameter to a value greater than the number of physical CPU cores, for example, 1.5 times the number of physical CPU cores. We recommend that you do not set this parameter to a value greater than 64 to avoid the kernel lock contention issue in OceanBase Community Edition.
          set global parallel_servers_target = 64;
          
        • Adjust the business tenant parameters

          // The maximum size of the temporary file I/O area.
          alter system set _temporary_file_io_area_size = '10' tenant = 'xxx';
          // 4.x disables throttling.
          alter system set sys_bkgd_net_percentage = 100;
          
      • If you use OceanBase Community Edition V3.x, you can adjust the following sys tenant parameters by using the CLI tool.

        // parallel_servers_target specifies the number of parallel queries per server.
        // If you want to ensure performance, we recommend that you set this parameter to a value greater than the number of physical CPU cores, for example, 1.5 times the number of physical CPU cores. We recommend that you do not set this parameter to a value greater than 64 to avoid the kernel lock contention issue in OceanBase Community Edition.
        set global parallel_servers_target = 64;
        // data_copy_concurrency specifies the maximum number of concurrent data migration and replication tasks.
        alter system set data_copy_concurrency = 200;
        
    • Incremental synchronization

      The following parameters are displayed only if you select Incremental Synchronization on the Select Migration Type page.

      Parameter Description
      Concurrency The concurrency mode can be Stable, Normal, Fast, or Custom. The performance of incremental synchronization varies depending on the concurrency mode. The resources required for incremental synchronization tasks vary depending on the concurrency mode. If you select Custom, you can set Read Concurrency, Write Concurrency, and JVM Memory as needed.
      Incremental Record Retention Period If you do not select Bind Kafka Data Source when you create the TiDB data source, this parameter is displayed. It specifies the period for which OMS Community Edition stores incremental parse files in the cache. The longer the retention period, the more disk space the OMS Community Edition Store component consumes.
      Incremental Synchronization Start Timestamp
      • If you select Full Migration when you select the migration type, this parameter is not displayed.
      • If you do not select Bind Kafka Data Source when you create the TiDB data source and you do not select Full Migration but you select Incremental Synchronization, specify the data after a specific point in time in this field. The default value is the current system time. For more information, see Set the incremental synchronization timestamp.
      Kafka Consumer group.id (Optional) This parameter is displayed if you select Bind Kafka Data Source when you create the TiDB data source. group.id is the unique identifier of the consumer group in Kafka.
    • Full verification

      The following parameters are displayed only if you select Full Verification on the Select Migration Type page.

      Parameter Description
      Concurrency The concurrency mode can be Stable, Normal, Fast, or Custom. The resources consumed during full verification can be limited by configuring the resource allocation for the Full-Verification component. If you select Custom, you can set Read Concurrency, Write Concurrency, and JVM Memory as needed.
  9. Click Precheck to perform a precheck on the data migration task.

    In the Precheck section, OMS Community Edition checks whether the database user has the read and write permissions and whether the database is connected to the network. You can start the data migration task only after all the precheck tasks are passed. If the precheck fails:

    • You can troubleshoot and resolve the issue and then perform the precheck again until the precheck succeeds.

    • You can click Skip in the operation column of the error precheck item. A dialog box appears, prompting you to skip the operation and confirming whether you want to proceed. If you confirm, click OK in the dialog box.

  10. Click Start Task. If you do not need to start the task, click Save to go to the details page of the data migration task. You can manually start the task as needed.

    OMS Community Edition allows you to modify the migration object during a data migration task. For more information, see View and modify the migration object. After the data migration task is started, it will be executed based on the selected migration type. For more information, see the "View details of a data migration task" section in View details of a data migration task.

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