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.3.1Enterprise Edition

  • OMS Documentation
  • OMS Introduction
    • Overview of OMS
    • Terms
    • OMS HA
    • Principles of Store
    • Principles of Full-Import and Incr-Sync
    • Data verification principles
    • Architecture
      • Overview
      • Hierarchical functional system
      • Basic components
    • OMS Oracle full migration design and impact
    • Limitations
  • Quick Start
    • Data migration process
    • Data synchronization process
  • Deploy OMS
    • Deployment types
    • System and network requirements
    • Memory and disk requirements
    • Environment preparations
    • Deploy OMS on a single node
    • Deploy OMS on multiple nodes in a single region
    • Deploy OMS on multiple nodes in multiple regions
    • Scale out
    • Scale down deployment
    • Check the deployment
    • Deploy a time-series database (Optional)
  • OMS console
    • Log in to the OMS console
    • Overview
    • User center
      • Configure user information
      • Change your login password
      • Log out
  • Data migration
    • Overview
    • Migrate data from a MySQL database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from a MySQL-compatible tenant of OceanBase Database to a MySQL database
    • Migrate data from an Oracle database to the MySQL compatible mode of OceanBase Database
    • Migrate data from the Oracle compatible mode of OceanBase Database to an Oracle database
    • Migrate data from an Oracle database to the Oracle compatible mode of OceanBase Database
    • Migrate data from a DB2 LUW database to an Oracle-compatible tenant of OceanBase Database
    • Migrate data from an Oracle-compatible tenant of OceanBase Database to a DB2 LUW database
    • Migrate data from a DB2 LUW database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from a MySQL-compatible tenant of OceanBase Database to a DB2 LUW database
    • Migrate data between OceanBase databases of the same tenant type
    • Configure a bidirectional synchronization task
    • Migrate data from a TiDB database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from a PostgreSQL database to the Oracle compatible mode of OceanBase Database
    • Migrate data from a PostgreSQL database to the MySQL compatible mode of OceanBase Database
    • Migrate data from a PolarDB-X 1.0 database to a MySQL-compatible tenant of OceanBase Database
    • Migrate incremental data from an Oracle-compatible tenant of OceanBase Database to a MySQL database
    • Manage data migration tasks
      • View details of a data migration task
      • Rename a data migration task
      • View and modify migration objects
      • Use tags to Manage data migration tasks
      • Perform batch operations on data migration tasks
      • Download and import settings of migration objects
      • View and modify migration parameters
      • Download a conflict log file
      • Start and pause a data migration task
      • End and delete a data migration task
    • Supported DDL operations and limits for synchronization
      • Synchronize DDL operations from a MySQL database to a MySQL-compatible tenant of OceanBase Database
        • Overview of DDL synchronization from MySQL to OceanBase Database's MySQL compatible mode
        • CREATE TABLE
          • Create a table
          • Create a column
          • Create indexes or constraints
          • Create partitions
        • Data type conversion
        • ALTER TABLE
          • Modify tables
          • Operations on columns
          • Operations on constraints and indexes
          • Partition operations
        • TRUNCATE TABLE
        • RENAME TABLE
        • DROP TABLE
        • CREATE INDEX
        • DROP INDEX
        • DDL incompatibilities between a MySQL database and a MySQL-compatible tenant of OceanBase Database
          • 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
      • Synchronize DDL operations from the MySQL compatible mode of OceanBase Database to a MySQL database
      • DDL operations for synchronizing data from an Oracle database to an Oracle-compatible tenant of OceanBase Database
        • Overview of DDL synchronization from Oracle to OceanBase Database Oracle compatible mode
        • CREATE TABLE
          • Overview for CREATE TABLE
          • Create a relational table
            • Create a relational table
            • Define columns of a relational table
          • Virtual columns
          • Regular columns
          • Create partitions
            • Overview for creating partitions
            • Partitioning
            • Subpartitioning
            • Composite partitioning
            • User-defined partitioning
            • Subpartition templates
          • Constraints
            • Overview
            • Inline constraints
            • Out-of-line constraints
        • CREATE INDEX
          • Overview
          • Oracle compatible mode
        • ALTER TABLE
          • Overview
          • Modify, drop, and add table attributes
          • Column attribute management
            • Modify, drop, and add column attributes
            • Rename a column
            • Add columns and column attributes
            • Modify column attributes
            • Drop columns
          • Modify, drop, and add constraints
          • Partition management
            • Modify, drop, and add partitions
            • Drop a partition
            • Drop a subpartition
            • Add partitions and subpartitions
            • Modify partitions
            • Drop partition data
        • DROP TABLE
        • RENAME OBJECT
        • TRUNCATE TABLE
        • DROP INDEX
        • DDL incompatibilities between an Oracle database and an Oracle-compatible tenant of OceanBase Database
          • Overview
          • Incompatibilities of CREATE TABLE
          • Incompatibilities in table modification operations
            • 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
      • Synchronize DDL operations from the Oracle compatible mode of OceanBase Database to an Oracle database
      • Synchronize DDL operations from a DB2 LUW database to an Oracle-compatible tenant of OceanBase Database
      • Synchronize DDL operations from the Oracle compatible mode of OceanBase Database to a DB2 LUW database
      • Synchronize DDL operations from a DB2 LUW database to a MySQL-compatible tenant of OceanBase Database
      • Synchronize DDL operations from the MySQL compatible mode of OceanBase Database to a DB2 LUW database
      • Synchronize DDL operations between MySQL-compatible tenants of OceanBase Database
      • DDL synchronization between Oracle-compatible tenants of OceanBase Database
      • DDL operations for synchronizing data from a PostgreSQL database to the MySQL compatible mode of OceanBase Database
      • DDL synchronization from PostgreSQL to OceanBase Database in Oracle compatible mode
  • Data synchronization
    • Overview
    • Synchronize data from OceanBase Database to a Kafka instance
    • Synchronize data from OceanBase Database to a RocketMQ instance
    • Synchronize data from OceanBase Database to a DataHub instance
    • Synchronize data from an ODP logical table to a physical table in a MySQL-compatible tenant of OceanBase Database
    • Synchronize data from an ODP logical table to a DataHub instance
    • Synchronize data from an IDB logical table to a MySQL-compatible tenant of OceanBase Database
    • Synchronize data from an IDB logical table to a DataHub instance
    • Synchronize data from a MySQL database to a DataHub instance
    • Synchronize data from an Oracle database to a DataHub 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
      • View and modify the parameter configurations of a data synchronization task
      • Start and pause a data synchronization task
      • End and delete a data synchronization task
  • Data validation
    • Overview
    • Create a data validation task
    • Manage data validation tasks
      • View details of a data validation task
      • Change the name of a data validation task
      • View and modify validation objects
      • View and modify validation parameters
      • Manage data validation tasks by using tags
      • Import validation objects
      • Start, stop, and resume a data validation task
      • Clone a data validation task
      • Delete a data validation task
  • Create and manage data sources
    • Create data sources
      • Create an OceanBase data source
        • Create a physical OceanBase data source
        • Create an ODP data source
        • Create an IDB data source
        • Create a public cloud OceanBase data source
        • Create a standalone OceanBase data source
      • Create a MySQL data source
      • Create an Oracle data source
      • Create a TiDB data source
      • Create a Kafka data source
      • Create a RocketMQ data source
      • Create a DataHub data source
      • Create a DB2 LUW data source
      • Create a PostgreSQL data source
      • Create a PolarDB-X 1.0 data source
    • Manage data sources
      • View data source information
      • Copy a data source
      • Edit a data source
      • Delete a data source
    • Create a database user
    • User privileges
    • Enable binlogs for the MySQL database
    • Minimum privileges required when an Oracle database serves as the source
  • OPS & Monitoring
    • O&M overview
    • Go to the overview page
    • Server
      • View server information
      • Update the quota
      • View server logs
      • Manage resource groups
    • Components
      • Store
        • Add 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
      • Incr-Verification
        • View details of the Incr-Verification component
        • Pause an Incr-Verification component
        • Rerun and resume an Incr-Verification component
        • Update an Incr-Verification component
      • Row-Verification
        • View details of a Row-Verification component
    • O&M Task
      • View O&M tasks
      • Skip a task or subtask
      • Retry a task or subtask
    • Parameter Template
      • Overview
      • Task Template
        • Create a task template
        • View and edit task templates
        • Copy and export a task template
        • Delete a task template
      • Component Template
        • Create a component template
        • View and edit component templates
        • Copy and export a component template
        • Delete a component template
      • Component parameters
        • Store component parameters
        • Incr-Sync component parameters
        • Full-Import component parameters
        • Full-Verification component parameters
        • Incr-Verification component parameters
        • Parameters of the Row-Verification component
        • CM component parameters
        • Supervisor component parameters
  • 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
      • oblogproxy parameters
    • Manage access keys
    • Operation audit
  • Troubleshooting Guide
    • 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/Full-Import tuning
      • Oracle store tuning
    • Set throttling
    • Store performance diagnostics
  • Reference Guide
    • Features
      • Configure DDL/DML synchronization
      • DDL synchronization scope
      • Rename databases and tables
      • Use SQL conditions to filter data
      • Set the incremental synchronization start timestamp
      • Configure matching rules for migration or synchronization objects
      • Configure matching rules for validation objects
      • Wildcard patterns supported for matching rules
      • Hidden column mechanisms
      • Instructions on schema migration
      • Create and update a heartbeat table
      • Change a topic
      • Column filtering
      • Data formats
    • API Reference
      • Overview
      • CreateProject
      • StartProject
      • StopProject
      • ResumeProject
      • ReleaseProject
      • DeleteProject
      • ListProjects
      • DescribeProject
      • DescribeProjectSteps
      • DescribeProjectStepMetric
      • DescribeProjectProgress
      • DescribeProjectComponents
      • ListProjectFullVerifyResult
      • StartProjectsByLabel
      • StopProjectsByLabel
      • CreateMysqlDataSource
      • CreateOceanBaseDataSource
      • CreateOceanBaseODPDataSource
      • CreatePolarDBDataSource
      • ListDataSource
      • CreateLabel
      • ListAllLabels
      • DeleteDataSource
      • CreateProjectModifyRecords
      • ListProjectModifyRecords
      • StopProjectModifyRecords
      • RetryProjectModifyRecords
      • CancelProjectModifyRecord
      • SubmitPreCheck
      • GetPreCheckResult
      • UpdateProjectConfig
      • Download schema conversion information
      • DownloadConflictData
      • ListConflictData
      • ResetIncrStartTimestamp
      • AdvanceProject
      • DescribeRegions
    • 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
    • SSO
      • Integrate the OIDC protocol to OMS to implement SSO
      • Integrate the SAML 2.0 protocol to OMS to implement SSO
      • Access Microsoft Entra ID using OMS SAML 2.0
    • OMS error codes
    • SQL statements for querying table objects
    • Create a trigger
    • Change the log level for a PostgreSQL database instance
    • Online DDL tools
    • Supplemental logging in Oracle databases
  • Upgrade Guide
    • Overview
    • Upgrade OMS in single-node deployment mode
    • Upgrade OMS in multi-node deployment mode
    • FAQ
  • FAQ
    • General O&M
      • How do I modify the resource quotas of an OMS container?
      • How do I troubleshoot the OMS server down issue?
      • Deploy InfluxDB for OMS
      • Increase the disk space of the OMS host
    • Task diagnostics
      • How do I troubleshoot common problems with Oracle Store?
      • How do I perform performance tuning for Oracle Store?
      • What do I do when Oracle Store reports an error at the isUpdatePK stack?
      • 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?
      • How do I use LogMiner to pull data from an Oracle database?
    • 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
    • Data migration
      • User privileges
        • What privileges do I need to grant to a user during data migration to or from an Oracle database?
      • 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 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 migrate an Oracle database object whose name exceeds 30 bytes in length?
        • How do I update whitelists and blacklists?
        • What are the application scope and limits of ETL?
    • Installation and deployment
      • How do I upgrade Store?
  • Release Note
    • Release Note
      • Version number rules
      • V4.3
        • OMS V4.3.1
        • OMS V4.3.0
      • V4.2
        • OMS V4.2.5
        • OMS V4.2.4
        • OMS V4.2.3
        • OMS V4.2.2
        • OMS V4.2.1
        • OMS V4.2.0
      • V4.1
        • OMS V4.1.0
      • V4.0
        • OMS V4.0.2
        • OMS V4.0.1
      • V3.4
        • OMS V3.4.0
      • V3.3
        • OMS V3.3.1
        • OMS V3.3.0
      • V3.2
        • OMS V3.2.2
        • OMS V3.2.1
      • V3.1
        • OMS V3.1.0
      • V2.1
        • OMS V2.1.2
        • OMS V2.1.0

Download PDF

OMS Documentation Overview of OMS Terms OMS HA Principles of Store Principles of Full-Import and Incr-Sync Data verification principles Overview Hierarchical functional system Basic components OMS Oracle full migration design and impact Limitations Data migration process Data synchronization process Deployment types System and network requirements Memory and disk requirements Environment preparations Deploy OMS on a single node Deploy OMS on multiple nodes in a single region Deploy OMS on multiple nodes in multiple regions Scale out Scale down deployment Check the deployment Deploy a time-series database (Optional) Log in to the OMS console Overview Configure user information Change your login password Log out Overview Migrate data from a MySQL database to a MySQL-compatible tenant of OceanBase Database Migrate data from a MySQL-compatible tenant of OceanBase Database to a MySQL database Migrate data from an Oracle database to the MySQL compatible mode of OceanBase Database Migrate data from the Oracle compatible mode of OceanBase Database to an Oracle database Migrate data from an Oracle database to the Oracle compatible mode of OceanBase Database Migrate data from a DB2 LUW database to an Oracle-compatible tenant of OceanBase Database Migrate data from an Oracle-compatible tenant of OceanBase Database to a DB2 LUW database Migrate data from a DB2 LUW database to a MySQL-compatible tenant of OceanBase Database Migrate data from a MySQL-compatible tenant of OceanBase Database to a DB2 LUW database Migrate data between OceanBase databases of the same tenant type Configure a bidirectional synchronization task Migrate data from a TiDB database to a MySQL-compatible tenant of OceanBase Database Migrate data from a PostgreSQL database to the Oracle compatible mode of OceanBase Database Migrate data from a PostgreSQL database to the MySQL compatible mode of OceanBase Database Migrate data from a PolarDB-X 1.0 database to a MySQL-compatible tenant of OceanBase Database Migrate incremental data from an Oracle-compatible tenant of OceanBase Database to a MySQL database View details of a data migration task Rename a data migration task View and modify migration objects Use tags to Manage data migration tasks Perform batch operations on data migration tasks Download and import settings of migration objects View and modify migration parameters Download a conflict log file Start and pause a data migration task End and delete a data migration task Synchronize DDL operations from the MySQL compatible mode of OceanBase Database to a MySQL database Synchronize DDL operations from the Oracle compatible mode of OceanBase Database to an Oracle database Synchronize DDL operations from a DB2 LUW database to an Oracle-compatible tenant of OceanBase Database Synchronize DDL operations from the Oracle compatible mode of OceanBase Database to a DB2 LUW database Synchronize DDL operations from a DB2 LUW database to a MySQL-compatible tenant of OceanBase Database Synchronize DDL operations from the MySQL compatible mode of OceanBase Database to a DB2 LUW database Synchronize DDL operations between MySQL-compatible tenants of OceanBase Database DDL synchronization between Oracle-compatible tenants of OceanBase Database DDL operations for synchronizing data from a PostgreSQL database to the MySQL compatible mode of OceanBase Database DDL synchronization from PostgreSQL to OceanBase Database in Oracle compatible mode Overview Synchronize data from OceanBase Database to a Kafka instance Synchronize data from OceanBase Database to a RocketMQ instance Synchronize data from OceanBase Database to a DataHub instance Synchronize data from an ODP logical table to a physical table in a MySQL-compatible tenant of OceanBase Database Synchronize data from an ODP logical table to a DataHub instance Synchronize data from an IDB logical table to a MySQL-compatible tenant of OceanBase Database Synchronize data from an IDB logical table to a DataHub instance Synchronize data from a MySQL database to a DataHub instance Synchronize data from an Oracle database to a DataHub 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 View and modify the parameter configurations of a data synchronization task Start and pause a data synchronization task End and delete a data synchronization task Overview Create a data validation task View details of a data validation task Change the name of a data validation task View and modify validation objects View and modify validation parameters Manage data validation tasks by using tags Import validation objects Start, stop, and resume a data validation task Clone a data validation task Delete a data validation task Create a MySQL data source Create an Oracle data source Create a TiDB data source
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.3.1
iconOceanBase Migration Service
V 4.3.1Enterprise 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

Configure a bidirectional synchronization task

Last Updated:2025-12-26 06:16:14  Updated
share
What is on this page
Background information
What is bidirectional synchronization
Supported migration types for bidirectional synchronization
Authorization statements for a MySQL data source
Create a schema and grant privileges for an Oracle data source
Considerations
Data conflict scenarios
Procedure
Configure a forward migration task
Configure a reverse migration task

folded

share

This topic describes how to set up a bidirectional synchronization task using OceanBase Migration Service (OMS), taking a bidirectional synchronization task from a MySQL database to the MySQL compatible mode of OceanBase Database as an example.

Background information

What is bidirectional synchronization

Bidirectional synchronization allows you to configure forward and reverse migration tasks for the same data source during incremental data synchronization, enabling data to be synchronized between the source and the target. The system prevents data that has been synchronized in one direction from being synchronized again in the opposite direction.

Note

Bidirectional synchronization does not mean that business operations can be performed simultaneously on both ends. If the same data (with the same primary key or unique key) is written to both ends, you must define a data conflict resolution strategy (override or ignore) in the configuration of the bidirectional synchronization task. We recommend that you avoid writing the same data to both ends at the same time.

Supported migration types for bidirectional synchronization

OMS supports bidirectional data synchronization between a MySQL database and the MySQL compatible mode of OceanBase Database, an Oracle database and the Oracle compatible mode of OceanBase Database, and between two OceanBase databases. For more information, see the corresponding data migration documentation.

Create a project to migrate data from a MySQL database to a MySQL tenant of OceanBase Database

Create a project to migrate data from a MySQL tenant of OceanBase Database to a MySQL database

Create a project to migrate data from an Oracle database to an Oracle tenant of OceanBase Database

Create a project to migrate data from an Oracle tenant of OceanBase Database to an Oracle database

Migrate data between OceanBase databases

Authorization statements for a MySQL data source

When you perform bidirectional synchronization between a MySQL database and the MySQL compatible mode of OceanBase Database, grant the CREATE DATABASE and CREATE TABLE privileges to the database account under the MySQL data source of the current task. OMS needs to create a transaction database and a transaction table to prevent circular replication in the bidirectional synchronization. Otherwise, the bidirectional synchronization task may fail.

  • Grant the global database creation privilege

    GRANT CREATE ON *.* TO '<user_name>';
    
  • Allow the user to create tables in the oms database

    GRANT CREATE ON oms.* TO '<user_name>';
    

Create a schema and grant privileges for an Oracle data source

When you perform bidirectional synchronization between an Oracle database and the Oracle compatible mode of OceanBase Database, create a schema named OMS in the Oracle data source of the current task, and grant the CREATE TABLE privilege on the OMS schema to the database account in the data source. Otherwise, the bidirectional synchronization task may fail.

  • Create an OMS user

    CREATE USER OMS IDENTIFIED BY <YOUR_PASSWORD> DEFAULT TABLESPACE <specified_tablespace>; // YOUR_PASSWORD is the actual user password.
    ALTER USER OMS QUOTA unlimited ON <tablesapce_specified_in_previous_step>;
    ALTER USER <data_source_username> QUOTA unlimited ON <tablesapce_specified_in_previous_step>;
    
  • Grant privileges

    GRANT CREATE ANY TABLE TO <YOUR_USERNAME>; 
    GRANT INSERT ANY TABLE TO <YOUR_USERNAME>;
    GRANT UPDATE ANY TABLE TO <YOUR_USERNAME>;
    GRANT DELETE ANY TABLE TO <YOUR_USERNAME>;
    GRANT SELECT ANY TABLE TO <YOUR_USERNAME>;
    

Considerations

A bidirectional synchronization task is configured by setting forward and reverse tasks.

Type Description
Forward task
  • Forward tasks supports schema migration, full migration, incremental DML, and incremental DDL operations.
  • Forward tasks cannot be configured for scenarios involving an aggregation database or table. For example, databases a and b are aggregated to database c.
  • Do not perform DDL operations for database or table schema changes during schema migration or full migration. Otherwise, the task will fail.
  • Do not configure a transaction table as an excluded object when using matching rules to select migration objects.
Reverse task
  • Reverse tasks can be configured only when the forward task is in the incremental synchronization phase and is running.
  • Reverse tasks support only incremental DML operations.
  • When configuring reverse tasks, you cannot edit the synchronized objects. The objects are automatically matched based on the forward task.
Other considerations
  • If a table without a primary key or a non-null unique key is involved in a bidirectional synchronization task, duplicate data may be generated in the corresponding database or table at the target.
  • During the execution of a bidirectional synchronization task, a database or schema named OMS is created in the MySQL or Oracle database, and transaction tables are created in the OMS database or schema to avoid data circular synchronization. Do not perform any DML or DDL operations on the transaction tables during the task execution.

Data conflict scenarios

To ensure data consistency in bidirectional synchronization, make sure that operations on the same primary key or non-null unique key are performed only on one end of the bidirectional synchronization. If both ends are updated simultaneously, data conflicts may occur. The main scenarios include:

  • Unique key conflicts during INSERT operations

    If the business performed nearly simultaneous INSERT operations on the same unique key on both ends, the data INSERT operation will fail at the target due to the uniqueness constraint when syncing to the target. You can configure the task to decide whether to ignore conflicting data or overwrite the target data.

  • Unique key conflicts during UPDATE operations

    • If the data to be updated already exists at the target, the source data will overwrite the target data.

    • If the data to be updated does not exist at the target, the data update will fail.

    • If the data to be updated causes a primary key or unique key conflict at the target after the update, the data update will fail.

  • Data conflicts during DELETE operations

    If the record to be deleted does not exist, the DELETE operation will fail.

Procedure

Configure a forward migration task

  1. Configure the data migration tack to the Select Migration Type step. Select Bidirectional Synchronization for Synchronization Topology.

    For more information, see the data migration task topic of the corresponding type.

  2. In the Migration Options section, select the migration type of the current data migration task.

    When the synchronization topology is set to Bidirectional Synchronization, the supported migration types include Schema Migration, Full Migration, and Incremental Synchronization.

    Migration type Description
    Schema Migration After the schema migration task is started, OMS migrates the data object definitions (such as tables, indexes, constraints, comments, and views) from the source to the target database and automatically filters out temporary tables.
    Full Migration After the full migration task is started, OMS migrates the existing data in the source database to the corresponding tables in the target database.
    Incremental Synchronization After the incremental synchronization task is started, OMS synchronizes the data that has changed in the source database (such as new data, modified data, and deleted data) to the corresponding tables in the target database. Incremental Synchronization includes DML synchronization and DDL synchronization, and you can customize the configurations as needed. For more information, see Customize DDL/DML.

    Note

    • In the bidirectional synchronization scenario, you cannot unselect the DML Synchronization option.
    • In the bidirectional synchronization scenario, only DDL synchronization of forward task is to be configured.
  3. Click Next. In the Select Migration Objects step, select the migration objects of the current data migration task.

    You can select migration objects through Specify Objects and Match by Rule. This topic describes the procedure of selecting migration objects through Specify Objects. For more information about how to configure matching rules, see database-to-database wildcard rules in Configure matching rules for migration or synchronization objects.

    Notice

    • The presence of the "$$" characters in the name of a database or table affects the creation of a data migration task.

    • If you have selected DDL Synchronization in the Select Migration Type step, we recommend that you select migration objects through matching rules to ensure that all new objects that meet the migration object rules are synchronized. If you select migration objects through the Specify Objects method, only the objects that you have selected will be synchronized.

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

    2. In the Source Object(s) list, select the objects that you want to migrate. You can select one or more tables or views from one or more databases as the migration objects.

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

    OMS allows you to import objects through text and allows you to rename, set row filtering, select partitions and columns, and remove one or more migration objects from the target objects.

    Note

    If you select migration objects through the Match by Rule method, the renaming capability is overridden by the matching rule syntax, and you can set only filtering conditions. For more information, see Configure matching rules.

    Operation Steps
    Import objects
    1. In the Target Object(s) list, click Import Objects in the upper-right corner.
    2. In the dialog box that appears, click OK.
      Notice:
      Importing objects will overwrite the previous object selection. Proceed with caution.
    3. In the Import Migration Objects dialog box, import the objects that you want to migrate.
      You can rename tables and views by importing CSV files and set row filtering conditions. For more information, see Download and import settings of migration objects.
    4. Click Validate.
    5. Click OK after it passes the validation.
    Rename objects OMS allows you to rename migration objects. For more information, see Rename databases and tables.
    Configure settings OMS allows you to set row filtering, select partitions and columns, and set row filtering.
    1. In the right-side list of the selection area, hover the pointer over the target object.
    2. Click Settings.
    3. In the Settings dialog box, you can perform the following operations.
        In the Row Filters field, enter the WHERE clause of a standard SQL statement to configure row filters. For more information, see Filter data by using an SQL condition.
      • In the Partition drop-down list, select the specified partition data that you want to obtain during full migration. After you select a partition, click OK.
      • In the Select Columns section, select the columns that you want to migrate. For more information, see Column filtering.
    Remove one or all objects OMS allows you to remove one or more objects temporarily selected in the target object list during data mapping.
    • To remove one migration object
      In the Target Object(s) list, hover the pointer over the target object and click Remove to remove the migration object.
    • To remove all migration objects
      In the Target Object(s) list, click Remove All in the upper-right corner. In the dialog box that appears, click OK to remove all migration objects.
  4. Click Next. In the Migration Options step, configure the parameters.

    • Schema Migration

      The following parameters are displayed only if you have selected Bidirectional Synchronization > Schema Migration in the Select Migration Type step.

      Parameter Description
      Automatically Enter Next Stage upon Completion If you select schema migration and any other migration type, you can specify whether to automatically proceed to the next stage after schema migration is completed. The default value is Yes. You can also view and modify this value on the Schema Migration tab of the data migration task details page.
      Normal Index Migration Method The migration method for non-unique key indexes associated with the migrated table objects. The options are Do Not Migrate, Migrate with Schema, and Post-Full-Migration. The last option is displayed only when full migration is selected.
    • Full Migration

      The following parameters are displayed only if you have selected Bidirectional Synchronization > Full Migration in the Select Migration Type step.

      Parameter Description
      Full Migration Rate Limit You can choose whether to limit the full migration rate as needed. If you choose to limit it, you must specify the RPS and BPS. The RPS specifies the maximum rows of data migrated to the target database per second during full migration, and the BPS specifies the maximum amount of data in bytes migrated to the target database per second during full migration.

      Note

      The RPS and BPS values set here are only for throttling, and the actual performance of full migration is limited by factors such as the configurations of the source and target databases and instance specifications.

      Full Migration Resource Configuration You can select Small, Medium, or Large for the default read concurrency, write concurrency, and memory, or you can customize the resource configuration for full migration. The resource configuration of the Full-Import component can limit the resource consumption during full migration.

      Notice

      When you customize the configuration, the minimum value is 1, and only integers are supported.

      Handle Non-empty Tables in Target Database Valid values: Ignore and Stop Migration.
      • If you select Ignore, when the data to be inserted conflicts with the existing data of a target table, OMS retains the existing data and records the conflict data.

        Notice

        If you select Ignore, data is pulled in IN mode for full verification. In this case, the scenario where the target table contains more data than the source table cannot be verified, and the verification efficiency will be decreased.

      • If you select Stop Migration and a target table contains data, an error is returned during full migration, indicating that the migration is not allowed. In this case, you must clear the data in the target table before you can continue with the migration.

        Notice

        After an error is returned, if you click Resume in the dialog box, OMS ignores this error and continues to migrate data. Proceed with caution.

    • Incremental Synchronization

      The following parameters are displayed only if you have selected Bidirectional Synchronization > Incremental Synchronization in the Select Migration Type step.

      Parameter Description
      Incremental Synchronization Rate Limit You can choose whether to limit the incremental synchronization rate as needed. If you choose to limit it, you must specify the RPS and BPS. The RPS specifies the maximum rows of data synchronized to the target database per second during incremental synchronization, and the BPS specifies the maximum amount of data in bytes synchronized to the target database per second during incremental synchronization.

      Note

      The RPS and BPS values set here are only for throttling, and the actual performance of incremental synchronization is limited by factors such as the configurations of the source and target databases and instance specifications.

      Incremental Log Pull Resource Configuration You can select Small, Medium, or Large for the default memory, or you can customize the resource configuration for incremental log pull. The resource configuration of the Store component can limit the resource consumption during log pull in incremental synchronization.

      Notice

      When you customize the configuration, the minimum value is 1, and only integers are supported.

      Incremental Data Write Resource Configuration You can select Small, Medium, or Large for the default write concurrency and memory, or you can customize the resource configuration for incremental data write. The resource configuration of the Incr-Sync component can limit the resource consumption during data write in incremental synchronization.

      Notice

      When you customize the configuration, the minimum value is 1, and only integers are supported.

      Incremental Record Retention Duration The duration that incremental parsed files are cached in OMS. A longer retention duration results in more disk space occupied by the Store component.
      Incremental Synchronization Start Timestamp
      • If you have selected Full Migration as the migration type, this parameter is not displayed.
      • If you have selected Incremental Synchronization but not Full Migration, specify a point in time after which the data is to be synchronized. The default value is the current system time. For more information, see Set an incremental synchronization timestamp.
      Adapt to Online DDL Tool If you enable this feature, the database uses an online DDL tool to perform online schema changes, and data migration filters out temporary table objects to improve the stability of the data migration task. For more information, see Online DDL tools.

      Note

      Currently, this feature is supported only in scenarios where the source database is a MySQL database and Alibaba Cloud DMS, gh-ost, or pt-osc is used to perform online schema changes.

      Data Conflict Handling Strategy The options are Ignore Errors and Keep Original Data on Target and Ignore Conflicts and Overwrite Target Data with Source Data. For more information, see the descriptions in the Data conflict scenarios section.
    • Advanced Options

      The following parameters are displayed only if the MySQL compatible mode of the target OceanBase database is V4.3.0 or later, and you have selected Schema Migration or Incremental Synchronization > DDL synchronization in the Select Migration Type step.

      The storage type of the target table object can be Default, Row Storage, Column Storage, or Hybrid Row-Column Storage. The setting determines the storage type of the target table object during schema migration or incremental synchronization. For more information, see default_table_store_format.

      Note

      The value Default means that other parameters are automatically set based on the parameter configurations of the target database. Table objects in schema migration and new table objects created by incremental DDL statements are written to corresponding schemas based on the specified storage type.

    If the parameters on the page cannot meet your needs, you can click Parameter Configuration at the bottom of the page to configure more specific parameters. If you have configured a task template or component template, you can also reference it here.

    oms131-en

  5. Click Pre-check to perform a precheck on the forward migration task.

    In the Precheck step, OMS checks whether the read and write permissions of the database user and the network connection of the database meet the requirements. You can start a data migration task only after all precheck tasks are passed. If an error is reported during the precheck:

    • You can troubleshoot and fix the issue, and then perform the precheck again until it succeeds.

    • You can also click Skip in the action column of the failed precheck item, which will prompt you to confirm whether you want to skip this item. Click OK in the dialog box to confirm.

  6. After the precheck succeeds, click Start Task to start the forward task.

Configure a reverse migration task

  1. On the Migration Tasks page, click Configuration next to the reverse task after the forward task reaches the incremental synchronization phase and the task status is Running.

  2. On the Configure Reverse Migration page, specify the name of the reverse migration task. The default name is the name of the forward task with the suffix "-reverse".

    We recommend that you use a combination of Chinese characters, numbers, and English letters. The name must not contain spaces and must be less than 64 characters in length.

  3. On the Confirm Migration Configuration step, confirm and modify the configurations.

    Parameter Description
    Source and Target The default values are displayed based on the type of the forward migration task. The values cannot be modified.
    Incremental Synchronization Select DML Synchronization as needed, including insert, update, and delete.
    Migratable Objects Click View to view the migratable objects selected in the forward migration task for reverse migration.
    Migration Options The configurations of the reverse migration task are the same as those of the incremental synchronization in the forward migration task. You can modify the configurations as needed.
  4. Click Next. The system performs a precheck on the reverse migration task.

  5. After the precheck succeeds, click Start Task to start the reverse migration task.

Previous topic

Migrate data between OceanBase databases of the same tenant type
Last

Next topic

Migrate data from a TiDB database to a MySQL-compatible tenant of OceanBase Database
Next
What is on this page
Background information
What is bidirectional synchronization
Supported migration types for bidirectional synchronization
Authorization statements for a MySQL data source
Create a schema and grant privileges for an Oracle data source
Considerations
Data conflict scenarios
Procedure
Configure a forward migration task
Configure a reverse migration task