OceanBase Migration Service (OMS) supports data migration, which allows you to migrate data to or from OceanBase Database in real time from or to other data sources.
Background information
Online data migration is supported. The OMS server must be able to connect to both the source and target instances. You only need to specify the source and the target, select the objects to migrate, and then start the data migration task.
OMS automatically completes the entire data migration process. It can replicate database objects, existing data, and incremental data from the source database (table) to the target database (table), and ensure real-time incremental synchronization from the source database to the target database.
Supported migration types
In the table, OceanBase Database in the MySQL compatible mode is abbreviated as OB_MySQL, and OceanBase Database in the Oracle compatible mode is abbreviated as OB_Oracle. For more information about the supported incremental DDL operations, see Supported DDL operations and limitations for incremental migration.
| Data migration task | Schema migration | Full migration | Incremental DML | Incremental DDL | Reverse increment | Tables without primary keys |
|---|---|---|---|---|---|---|
| MySQL -> OB_MySQL | Supported | Supported | Supported | Supported | Supported | Supported |
| Oracle-> OB_MySQL | Supported | Supported | Supported | Not supported | Supported | Supported |
| TiDB -> OB_MySQL | Supported | Supported | Supported | Not supported | Supported | Supported |
| PostgreSQL -> OB_MySQL | Supported | Supported | Supported | Not supported | Supported | Supported |
| DRDS -> OB_MySQL | Not supported | Supported | Supported | Not supported | Not supported | Supported |
| Oracle -> OB_Oracle | Supported | Supported | Supported | Supported | Supported | Supported |
| DB2 LUW -> OB_Oracle | Supported | Supported | Supported | Supported | Supported | Supported |
| OB_Oracle -> OB_Oracle | Supported | Supported | Supported | Supported | Supported | Supported |
| OB_MySQL -> OB_MySQL | Supported | Supported | Supported | Supported | Supported | Supported |
| OB_Oracle -> Oracle | Supported | Supported | Supported | Supported | Supported | Supported |
| OB_Oracle -> MySQL | Not supported | Not supported | Supported | Not supported | Not supported | Supported |
| OB_MySQL -> MySQL | Supported | Supported | Supported | Supported | Supported | Supported |
| OB_Oracle -> DB2 LUW | Supported | Supported | Supported | Supported | Supported | Supported |
| DB2 LUW -> OB_MySQL | Supported | Supported | Supported | Supported | Supported | Supported |
| OB_MySQL -> DB2 LUW | Supported | Supported | Supported | Supported | Supported | Supported |
Migration types
| Migration Type | Description |
| Schema migration | Migrates data object definitions (tables, indexes, constraints, comments, and views) from the source database to the target database. It automatically filters out temporary tables. If the source database is not an OceanBase Database, OMS automatically converts and assembles the data types and SQL syntaxes based on the syntax standards of the target OceanBase tenant type, and then replicates them to the target database. |
| Full migration | Migrates the existing data in tables of the source database to corresponding tables in the target database. You can view information about migrated tables and indexes on the Table Objects and Table Indexes tabs on the Full Migration page. You can also view the performance of full migration on the Migration Performance tab. The status of a full migration task changes to Completed only after the table objects and table indexes are migrated. You can click View Creation Syntax in the Actions column of a table object to view the index creation syntax. You can combine full migration with incremental synchronization to ensure data consistency between the source and target databases. If any objects fail to be migrated during full migration, the causes of the failure are displayed. |
| Incremental synchronization | Synchronizes the data that is added, modified, or deleted in the source database to corresponding tables in the target database. Before the full migration is started, OMS starts the incremental pull module to pull incremental updated data from the source instance, parse and encapsulate the data, and store the data in OMS. After the full migration is completed, OMS starts the incremental data replay module to obtain incremental data from the incremental data pull module. The incremental data is filtered, mapped, and converted, and then synchronized to the target instance. |
| Full verification | After full migration and incremental data migration are completed, OMS automatically initiates a full data verification task to verify the data tables in the source and target databases. During incremental data synchronization, you can also initiate custom data verification. For data that fails the verification, you can reverify all data in the table or only the inconsistent data. |
| Forward switchover | Unlike a traditional system cutover process, a forward switchover does not involve the switching of business application connections. Instead, it is a task flow that needs to be executed when you switch applications in the OMS data migration task. You must complete all steps of a forward switchover before you switch the application connections to the target database. A forward switchover is an essential step in data migration. After the switchover, OMS ensures that data is migrated to the target database and you can enable the incremental migration component as needed. The main tasks involved in a forward switchover are as follows:
|
| Reverse incremental migration | After the data migration task is completed, you can initiate incremental synchronization in OMS to synchronize data from the target database to the source database before you switch the business database. This allows you to revert changes made in the target database after the business switch back to the source business database. |
Supported task types
OMS provides data migration in real time and incremental data synchronization. The supported migration scenarios are as follows:
Migrate data from a MySQL database to the MySQL compatible mode of OceanBase Database
Migrate data from the MySQL compatible mode 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 MySQL 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 the Oracle compatible mode of OceanBase Database
Migrate data from the Oracle compatible mode of OceanBase Database to a DB2 LUW database
Migrate data from a DB2 LUW database to the MySQL compatible mode of OceanBase Database
Migrate data from the MySQL compatible mode of OceanBase Database to a DB2 LUW database
Migrate data from a TiDB database to the MySQL compatible mode of OceanBase Database
Migrate data from a PostgreSQL database to the MySQL compatible mode of OceanBase Database
Migrate incremental data from the Oracle compatible mode of OceanBase Database to a MySQL database
Migrate data from a PolarDB-X 1.0 database to the MySQL compatible mode of OceanBase Database
Note
For more information about the database versions supported by the migration scenarios, see Limitations.