This topic describes how to use OceanBase Migration Service (OMS) to migrate data from a SQL Server database to OceanBase Database in MySQL-compatible mode (including physical data sources, public cloud data sources, and standalone data sources).
Background information
SQL Server is a relational database management system developed by Microsoft. By creating a data migration task in the OMS console to migrate data from an SQL Server database to the MySQL-compatible mode of OceanBase Database, you can seamlessly migrate the existing business data and incremental data from the source database to the MySQL-compatible mode of OceanBase Database through schema migration, full migration, incremental synchronization, and reverse incremental migration.
In the OMS console, the data source type for SQL Server is displayed as SQLServer.
Schema migration: Migrates data object definitions such as table structures from an SQL Server database to the MySQL-compatible mode of OceanBase Database. Data types and SQL syntax are automatically converted according to OMS's mapping rules.
Full migration: Migrates the existing data from an SQL Server database to the MySQL-compatible mode of OceanBase Database.
Incremental synchronization: Based on the SQL Server CDC feature, it synchronizes incremental change data (DML and DDL) from an SQL Server database to the MySQL-compatible mode of OceanBase Database in real time.
Reverse incremental migration: After business switchover, it flows back the change data generated in the MySQL-compatible mode of the target OceanBase Database to the source SQL Server database in real time.
Prerequisites
The corresponding Schema has been created in the MySQL-compatible mode of the target OceanBase Database.
A dedicated database user for the data migration task has been created for both the source SQL Server database and the MySQL-compatible mode of the target OceanBase Database, and the relevant permissions have been granted. For details, see Create a database user and User privileges.
An SQL Server data source and an OceanBase Database MySQL-compatible mode data source have been created in OMS. For details, see Create an SQL Server data source.
Clock synchronization is required between the machine where the SQL Server database resides and the OMS machine (for example, configure the NTP service). Otherwise, the latency reported for incremental synchronization may be inaccurate.
If you need to perform incremental synchronization, the source SQL Server database must meet the following requirements:
The database's log recovery mode (Recovery Mode) has been set to
FULL.At least one full physical backup and one log backup have been successfully performed.
The
srvnamefield in thesys.sysserversview is consistent with the return value of theSERVERPROPERTYfunction. If they are inconsistent, adjust the SQL Server server name and then restart the SQL Server service.The SQL Server Agent service is running. SQL Server CDC depends on Agent jobs. Ensure the CDC job is running normally; otherwise, the data migration task will fail.
CDC has been enabled for the database using an account with
sysadminprivileges. The method is as follows.-- Switch to the database to be migrated. Subsequent statements will act on the current database. USE [<database_name>]; GO -- Confirm the current database is correct. SELECT DB_NAME() AS current_database; GO -- This statement is executed only when CDC is not enabled for the current database. IF (SELECT is_cdc_enabled FROM sys.databases WHERE name = DB_NAME()) = 0 EXECUTE sys.sp_cdc_enable_db; GO -- Check the current CDC status of the database. A return value of 1 indicates that it is enabled. SELECT name, is_cdc_enabled FROM sys.databases WHERE name = DB_NAME(); GONotice
sys.sp_cdc_enable_dbacts on the current database and does not automatically switch to<database_name>. You must first executeUSE [<database_name>]and confirm withDB_NAME(). Otherwise, it may act on the wrong database or fail.Note
Table-level CDC capture instances are automatically created and maintained by OMS. You do not need to manually execute
sys.sp_cdc_enable_table. For details, see "Objects created by OMS at the source" in the "Considerations" section of this topic.The tables to be migrated already have a primary key or a non-nullable unique key. A single SQL Server table supports at most two CDC capture instances. If the number of existing CDC instances for the tables to be migrated reaches the limit, OMS cannot create a new CDC instance, causing incremental synchronization to fail.
Notice
Do not manually enable CDC on tables being synchronized by OMS.
Limitations
Only SQL Server Enterprise Edition based on the Windows operating system is supported. Supported versions are 2008, 2008 R2, 2012, 2014, 2016, 2017, and 2019.
OMS does not migrate objects or data from SQL Server system databases, including
master,msdb,model,tempdb, andresource.OMS does not migrate objects or data under system schemas, including
sys,INFORMATION_SCHEMA,cdc, andguest.Migration only supports tables; other object types such as views, stored procedures, and functions are not supported.
OMS does not support migrating tables without a NOT NULL unique key, memory-optimized tables, temporary tables, or compressed tables. Please manually exclude the aforementioned tables in the Select Migration Objects step.
OMS does not support migrating columns of the
hierarchyid,geography,sql_variant, ortimestamp(i.e.,rowversion) data types. If a table to be migrated contains columns of these types, schema migration or incremental synchronization may fail. Thehierarchyidtype is intercepted during the precheck phase.The
uniqueidentifierandxmldata types are supported only during schema migration and are not supported for synchronizing changes to these type columns during incremental synchronization:uniqueidentifier: mapped toVARCHAR(36)during schema migration.xml: mapped toLONGTEXTduring schema migration.
Note
The
geometrydata type is supported for migration, but the Z and M coordinates of SQL Server spatial types are not supported. Supported spatial objects include Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection; CircularString, CompoundCurve, and CurvePolygon are not supported.OMS does not support triggers (Trigger) at the target. If a target table has triggers, data migration may fail or the write result may not meet expectations.
Incremental synchronization does not support obtaining incremental data for the following columns:
Calculated columns: Data for calculated columns is automatically generated by the target database based on calculation logic.
Sparse columns written via column sets: Incremental data for sparse columns generated by regular writing methods is supported.
Columns with column-level encryption.
OMS does not enforce validation of SQL Server's primary/standby database attributes, but incremental synchronization is only supported from the primary database, and it is only supported when the CDC service is enabled on the SQL Server primary replica. SQL Server Always On availability groups are not supported for migration.
This link only supports unidirectional migration and does not support bidirectional synchronization topologies. If you need to flow data back after a business switch, configure reverse incremental synchronization. For related limitations, see the "Limitations of reverse incremental synchronization" section below.
Data source identifiers, database user accounts, etc., must remain globally unique within the OMS system.
OMS only supports migrating objects whose database, table, and column names are ASCII-compliant and do not contain special characters (including line breaks, spaces, and
.|"'`()=;/&\).When an SQL Server
IDENTITYauto-increment column is migrated to OceanBase Database in MySQL-compatible mode, it is converted toAUTO_INCREMENT, but retaining the auto-increment start value and step size (for example, the start value 10 and step size 3 inIDENTITY(10,3)) is not supported. The post-migration auto-increment behavior is determined by the target OceanBase Database in MySQL-compatible mode.The maximum size of large object types in SQL Server (
VARCHAR(MAX),NVARCHAR(MAX),TEXT,NTEXT,VARBINARY(MAX), andIMAGE) is 2 GB. In the MySQL-compatible mode of OceanBase Database, the maximum size of a singleLONGTEXTorLONGBLOBvalue is 510 MB. Data exceeding this limit cannot be migrated.SQL Server does not support updating the values in an
IDENTITYauto-increment column. Therefore, writing data to align with the auto-increment column on the business side is not feasible in this process.XML indexes in SQL Server are converted into regular indexes during schema migration. Executions on such indexes at the target will fail as expected. Do not rely on the capability of XML indexes.
If the character encoding of a source
charorvarcharcolumn is inconsistent with that of the target, data writes may report errors or cause Chinese characters to appear garbled. Both forward synchronization and reverse incremental synchronization are affected. The common collation for SQL Server isSQL_Latin1_General_CP1_CI_AS. Before migration, ensure the target character set can accommodate your business data (for example, useutf8mb4), or switch to usingncharornvarcharto store Chinese characters.After configuring row filter conditions for migration objects, row count validation compares the filtered values case by case, which is not entirely consistent with the behavior of full migration and full validation. Refer to the results of full validation and resolve any validation discrepancies before switching services.
Limitations of Reverse Incremental Migration
Reverse incremental migration does not support ETL configurations.
The
datetimetype in SQL Server is imprecise. When high-precision decimals are written back from the target to the source, they may be rounded (for example, a decimal578at the target may become577when queried at the source), leading to data inconsistency between the two sides.When adding a NOT NULL column to a table with existing data at the target, SQL Server requires the column to have a default value; otherwise, the reverse incremental DDL operation will report an error when executed at the source. This restriction does not apply in the MySQL-compatible mode of OceanBase Database.
When deleting a source column in reverse incremental DDL, if the column is still referenced by a default value, constraint, or index, an error will occur when the operation is synchronized to SQL Server.
Considerations
Limitations on operations in the source database
Do not perform DDL operations that modify database or table schemas during schema migration or full data migration. Otherwise, object schema inconsistencies, full data loading failures, or data migration task interruptions may occur.
Incremental synchronization supports synchronizing some DDL operations. For the supported scope, see Synchronize DDL operations from an SQL Server database to an OceanBase database. When performing DDL operations in a production environment, comply with the following limitations:
Do not perform DDL operations during peak business hours, as this may cause data loss. Perform schema changes during off-peak hours or maintenance windows.
Do not frequently perform DDL operations on the same table, such as executing
ALTER TABLEmultiple times in a short period. An SQL Server database supports at most two CDC capture instances per table. When a task is restarted, at most oneALTER TABLEoperation is allowed for the same table.Do not perform DDL operations when the OMS synchronization latency is high. High latency may increase the risk of incremental data disconnection due to CDC instance switchover.
Do not modify the primary key or unique key configuration of the source table. Such DDL operations are not supported for synchronization to the target and may lead to inaccurate incremental data positioning and data quality issues.
If you need to perform high-risk DDL operations such as
DROP TABLE,RENAME, splitting, or merging tables, first pause or adjust the OMS task and handle the target objects according to the O&M process.Before performing DDL operations on a table already synchronized by OMS, ensure the OMS task status is normal and the synchronization latency is acceptable.
After performing production DDL changes, verify the data (for example, compare table schemas, row counts of key tables, or sample data) to ensure consistency between the source and target. For details, see Create a data verification task.
Log retention requirements
The default retention period for data changed by SQL Server CDC is 72 hours, which you can adjust based on your business needs. OMS requires at least 48 hours of incremental data available for consumption at the source. It is recommended to ensure the CDC data retention period is longer than this value.
If a data migration task is configured with only Incremental Synchronization, the source transaction logs or log backups must be retained for more than 48 hours.
If a data migration task is configured with both Full Migration and Incremental Synchronization, the source transaction logs or log backups must be retained for at least 7 days.
Insufficient log retention may prevent OMS from obtaining incremental logs, causing the data migration task to fail or even leading to data inconsistency between the source and target.
Incremental synchronization depends on the SQL Server CDC feature. CDC stores incremental data separately in the current database. Properly assess the size of the database data files to avoid business impact from CDC data bloat.
If a leader-replica switchover occurs in SQL Server, the OMS task will fail, and you will need to rebuild the data migration task.
OMS may install database-level DDL triggers in the source database to record DDL history and maintain SQL Server CDC capture instances, as follows:
When a significant
ALTER TABLEoperation is performed, the trigger may create a new CDC capture instance and switch the old instance if necessary.If the number of CDC capture instances for a single table reaches the SQL Server upper limit (2), the trigger may roll back the DDL operation.
If an old CDC change table needs to be retained for OMS to continue consuming, the trigger will move and rename it to an
OMS_BAK_*table.Do not manually delete the
OMS_BAK_*tables under theoms_sqlserver_cdc_schemaschema unless you are sure OMS has completed consumption. TheseOMS_BAK_*tables are internal OMS objects and may contain incremental data that has not yet been fully synchronized.
OMS creates triggers, DDL record tables, CDC capture instances, and backup tables in the source database using fixed naming conventions. You do not need to manually maintain these objects.
ObjectNaming conventionDescriptionDDL Trigger oms_cdc_sync_ddlThe trigger name is fixed. Only one OMS DDL trigger is installed per database. Whether to listen for CREATE_TABLEis determined by the script selected during OMS installation.DDL Record Table oms_sqlserver_cdc_schema.oms_cdc_ddl_historyRecords source-side DDL history, including schema name, table name, original DDL SQL, and creation time, for OMS to process schema changes. Synchronization Progress Table oms_sqlserver_cdc_schema.oms_sync_progressRecords OMS synchronization progress. The trigger executes OMS-related logic only if this table exists in the source database. CDC Capture Instance OMS_{Schema}_{TableName}_{yyyyMMddHHmmss}For example, OMS_dbo_orders_20260520113000. If the name exceeds SQL Server's length limit, the prefix is truncated while the timestamp is retained.CDC Backup Table oms_sqlserver_cdc_schema.OMS_BAK_{oldCaptureInstance}_{yyyyMMddHHmmss}_{random}A change table retained before switching old CDC capture instances, used by OMS to continue reading old incremental data when consumption lags exist. Note
When troubleshooting issues, business personnel and DBAs can view recent DDL records in
oms_cdc_ddl_historyand check for historical CDC change tables pending cleanup inOMS_BAK_*.During the Stop Forward Sync phase of a forward switchover, OMS cleans up CDC capture instances at the table level of the current link while retaining the CDC enable status at the database level. When terminating a data migration task, if the task includes incremental synchronization, OMS will simultaneously delete all SQL Server CDC capture instances used by the current link.
If the table structures at the source and target are not identical, data inconsistency may occur. Known scenarios include:
When manually creating a target table structure, if it exceeds OMS's support scope, implicit conversions may occur, leading to inconsistent column types between the source and target.
If the target field length is shorter than the source field length, data truncation may occur, causing inconsistency between source and target data.
SQL Server's
TIMEandDATETIME2types have 7-bit second precision, while OceanBase Database's MySQL-compatible mode supports at most 6 bits; excess precision is truncated, which may lead to data inconsistency.
If table objects differing only in case exist at the source or target, the data migration result may not meet expectations due to case-insensitivity.
Schema migration and incremental DDL will ignore the character set and collation settings of source tables or columns, using the default values of the target.
Clock desynchronization between nodes, or between the client and server, can cause inaccurate latency reporting (for incremental synchronization/reverse incremental).
For example, if a clock is ahead of standard time, the reported latency may be negative. If a clock is behind standard time, it may cause a positive latency.
As SQL Server is a commercial closed-source database, unexpected issues may arise during incremental synchronization due to log format limitations. Before production deployment, please strictly perform POC testing, covering business peaks, full business scenarios, table structure adjustments, and complete data verification.
Data type mappings
SQL Server database |
MySQL-compatible mode of OceanBase Database |
Description |
|---|---|---|
| TINYINT | TINYINT UNSIGNED | The value range of TINYINT in SQL Server is [0, 255], so it must be mapped to an unsigned type. |
| SMALLINT | SMALLINT | / |
| INT or INTEGER | INT | / |
| BIGINT | BIGINT | / |
| DECIMAL[(M[,D])] | DECIMAL(M,D) or NUMBER(M,D) | The value range of M on the target side is [1, 38], and the value range of D is [-84, 127]. |
| NUMERIC[(M[,D])] | DECIMAL(M,D) | The value range of M on the target side is [1, 38], and the value range of D is [-84, 127]. |
| SMALLMONEY | NUMBER(10,4) | The currency data type in SQL Server stores only the numeric value and does not store the currency symbol. Therefore, it can be mapped to the NUMBER(10,4) data type. |
| MONEY | NUMBER(19,4) | The currency data type in SQL Server stores only the numeric value, not the currency symbol. Therefore, it can be mapped to NUMBER(19,4). |
| FLOAT[(n)] | DOUBLE | The precision is 15 digits. |
| REAL | FLOAT | The precision is 7 digits. |
| BIT | BIT | The source supports the values 0, 1, and NULL, while the target does not support values other than NULL. |
| CHAR(n) | CHAR(n) or VARCHAR(n) | When n ≤ 256, it is mapped to CHAR(n); when n > 256, it is mapped to VARCHAR(n). |
| VARCHAR(n) | VARCHAR(n) | / |
| VARCHAR(MAX) | TINYTEXT or TEXT or MEDIUMTEXT or LONGTEXT | The maximum size for an SQL Server large object type is 2 GB, while in the MySQL-compatible mode of OceanBase Database, it is 510 MB. Data exceeding 510 MB cannot be migrated. |
| TEXT | TINYTEXT or TEXT or MEDIUMTEXT or LONGTEXT | Similarly, data exceeding 510 MB cannot be migrated. |
| NCHAR(n) | CHAR(n) or VARCHAR(n) | When n ≤ 256, it is mapped to CHAR(n); when n > 256, it is mapped to VARCHAR(n). |
| NVARCHAR(n) | VARCHAR(n) | / |
| NVARCHAR(MAX) | TINYTEXT or TEXT or MEDIUMTEXT or LONGTEXT | Similarly, data exceeding 510 MB cannot be migrated. |
| NTEXT | TINYTEXT or TEXT or MEDIUMTEXT or LONGTEXT | Similarly, data exceeding 510 MB cannot be migrated. |
| BINARY(n) | BINARY(n) or VARBINARY(n) | When n ≤ 256, it is mapped to BINARY(n); when n > 256, it is mapped to VARBINARY(n). |
| VARBINARY(n) | VARBINARY(n) | / |
| VARBINARY(MAX) | TINYBLOB or BLOB or MEDIUMBLOB or LONGBLOB | Similarly, data exceeding 510 MB cannot be migrated. |
| IMAGE | TINYBLOB or BLOB or MEDIUMBLOB or LONGBLOB | Similarly, data exceeding 510 MB cannot be migrated. |
| TIME[(n)] | TIME(6) | The MySQL-compatible mode of OceanBase Database supports a maximum of six digits of precision; any digits beyond that will be truncated. |
| DATE | DATE | / |
| SMALLDATETIME | DATETIME | / |
| DATETIME | DATETIME(3) | / |
| DATETIME2[(n)] | DATETIME(6) | The MySQL-compatible mode of OceanBase Database supports a maximum of six digits of precision; any digits beyond that will be truncated. |
| DATETIMEOFFSET[(n)] | TIMESTAMP(6) | If the source includes a time zone offset, it will be converted to the target's time zone during full migration and incremental synchronization writes. |
| GEOMETRY | GEOMETRY | Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection are supported. CircularString, CompoundCurve, and CurvePolygon are not supported. The Z and M coordinates of SQL Server spatial types are not supported. |
| UNIQUEIDENTIFIER | VARCHAR(36) | This type of column is only supported during schema migration. Incremental synchronization does not support synchronizing changes to this type of column. |
| XML | LONGTEXT | This type of column is only supported during schema migration. Incremental synchronization does not support synchronizing changes to this type of column. |
Note
OMS does not support migrating the hierarchyid, geography, sql_variant, or timestamp (i.e., rowversion) types. The uniqueidentifier and xml types are supported only during schema migration and not for incremental synchronization. For details, see the "Limitations" section of this topic. The cursor and table types cannot be used to create tables and are not involved in migration.
Procedure
Create a data migration task.
Log in to the OMS console.
In the left-side navigation pane, click Data Migration.
On the Data Migration page, click Create Task in the upper-right corner.
On the Create Task page, customize the name of the migration task.
We recommend that you use a combination of Chinese characters, numbers, and letters. The name must not contain spaces and must not exceed 64 characters in length.
Notice
The task name is a unique identifier within the OMS system. Please choose a suitable name.
In the Select Source and Target step, configure the parameters.
ParameterDescriptionSource If you have created an SQL Server data source, select it from the drop-down list. If not, click New Data Source in the drop-down list to create one in the dialog box on the right. For more information, see Create an SQL Server data source. Destination If you have created an OceanBase Database data source in MySQL-compatible mode (including a physical data source, a public cloud data source, or a standalone data source), select it from the drop-down list. If not, click New Data Source in the drop-down list to create one in the dialog box on the right. For more information, see Create a physical OceanBase data source, Create a public cloud OceanBase data source, or Create a standalone OceanBase data source. Tag (Optional) Click the text box and select a target tag from the drop-down list. You can also click Manage Tags to create, modify, or delete tags. For more information, see Manage data migration tasks by using tags. Click Next. In the Select Migration Type step, select the migration type for the current data migration task.
This process does not support selecting a synchronization topology; only unidirectional synchronization is supported.
Note
This process does not support configuring bidirectional synchronization. To return data after a business switchover, select Reverse Incremental. For more information, see the description of reverse incremental migration in the "Procedure" section of this topic.
Migration Type includes Schema Migration, Full Migration, Incremental Synchronization (DML + DDL), and Reverse Increment (DML + DDL).
Migration TypeLimitationsSchema Migration After a schema migration task starts, OMS migrates the data object definitions (such as tables, indexes, and constraints) from the source database to the destination database and performs type conversion according to the syntax of OceanBase Database's MySQL-compatible mode. This process does not support migrating other types of objects, such as views or stored procedures. Full Migration After a full migration task starts, OMS migrates the existing data from the source database tables to the corresponding tables in the destination database. If you select Full Migration, we recommend that you collect statistics from the SQL Server database before migrating data. Incremental Synchronization After an incremental synchronization task starts, OMS synchronizes the changed data (inserts, modifications, or deletions) from the source database to the corresponding tables in the destination database based on SQL Server's CDC functionality.
Incremental Synchronization includes DML synchronization and DDL synchronization. You can customize the synchronization scope as needed. For more information, see Configure DDL/DML synchronization and Synchronize DDL from an SQL Server database to an OceanBase database.Reverse Incremental After a reverse incremental task starts, it can real-time return the changed data generated in the destination database after the business switchover to the source SQL Server database.
Typically, reverse incremental migration reuses the configuration of incremental synchronization, but you can also customize it based on actual needs. Reverse Increment cannot be selected when there is multi-table convergence or when there is a one-to-many schema mapping.
For the DDL synchronization of reverse incremental migration, you can selectcreate,alter,drop,rename,truncatefor the Table category andcreate,dropfor the Index category in Custom Synchronization Scope. The supported DDL scope is different from that of forward incremental synchronization. For details, see "From OceanBase Database to SQL Server Database" in Synchronize DDL from an SQL Server database to an OceanBase database.Click Next. In the Select Migration Objects step, select the objects that need to be migrated for the current data migration task.
You can select migration objects through three methods: Specify Objects, import CSV files, and Match by Rule. This topic describes how to select migration objects using the Specify Objects method. For details on configuring matching rules, see Configure matching rules.
Notice
Only tables are supported as migration objects. Tables that do not have a non-null unique key, memory-optimized tables, temporary tables, and compressed tables are not supported. Exclude these types of tables when selecting migration objects.
The names of databases, tables, and columns to be migrated must be in ASCII and cannot contain special characters. For more information, see the "Limitations" section of this topic.
OMS automatically filters out unsupported objects. For information about querying objects by SQL statement, see Query database objects.
Migration objects are displayed in a hierarchy structure of Database > Table > Table.
In the Select Migration Objects step, select Specify Objects.
In the Source Object(s) list, select the objects you want to migrate.
Click > to add them to the Target Objects list.
OMS supports renaming target objects, removing them, and setting row filter conditions, selecting partitions, selecting columns, and modifying column name mappings.
Note
When you select migration objects by using the Matching Rules method, the renaming capability is overridden by the matching rule syntax, and only filter conditions can be set in the operation section. You can modify the matching rules during task execution. For more information, see View and modify migration objects.
OperationStepImport Objects - In the Target Objects list, click Import Objects in the upper-right corner.
- In the dialog box, click Create.
Note:
The import will overwrite previous operation selections. Proceed with caution. - In the Import Migration Objects dialog box, import the objects you want to migrate.
You can rename databases and tables, set row filter conditions, and perform other operations by importing a CSV file. For more information, see Download and import migration object configurations. - Click Validate.
- After passing the validation, click OK.
Rename OMS supports renaming migration objects. For more information, see Rename a database or table. Settings OMS supports configuring row filter conditions, selecting partitions, selecting columns to migrate, and modifying column name mappings. - In the right-side list of the selection area, hover your mouse over the target object.
- Click the displayed Settings.
- In the Settings dialog box, you can perform the following operations.
-
In the text box of the Row Filters section, enter a WHERE clause from a standard SQL statement to configure row filtering. For more information, see Filter data with SQL conditions.
- In the Select Columns section, select the columns you want to migrate. For more information, see Column filtering.
Remove/Remove All OMS allows you to remove one or more temporarily selected objects to the target during data mapping. - Remove a single migration object
In the Target Objects list, hover your mouse over the target object and click the displayed Remove to remove that migration object. - Remove all migration objects
In the Target Objects list, click Remove All in the upper-right corner. In the dialog box, click OK to remove all migration objects.
Click Next. On the Migration Options page, configure the parameters.
Schema Migration
The following parameters are displayed only if you select Schema Migration in the Select Migration Type step.
ParameterDescriptionAutomatically proceed to the next stage upon completion When you select schema migration along with any other migration type, you can set whether to automatically proceed to the next stage after schema migration is complete. The default value is Yes. You can also view and modify this setting on the Schema Migration tab of the data migration task details page. Normal index migration method Refers to the migration method for non-unique key indexes associated with table objects after migration. Valid values are Do Not Migrate, Migrate with Schema, and Post-Full-Migration" (this option is displayed only when Full Migration is selected). Note
Clustered indexes, filtered indexes, and unique and non-unique indexes in SQL Server are all converted into normal indexes in the MySQL-compatible mode of OceanBase Database.
Full Migration
The following parameters are displayed only if you select Full Migration in the Select Migration Type step.
ParameterDescriptionFull Migration Rate Limit You can decide whether to enable the full migration rate limit based on your actual needs. If enabled, set the RPS (the maximum number of data rows that can be migrated to the target per second during the full migration phase) and BPS (the maximum amount of data that can be migrated to the target per second during the full migration phase). Note
The RPS and BPS set here are only for throttling. The actual achievable performance during full migration is limited by factors such as the source, target, and instance specifications.
Full Migration Resource Configuration You can select the default read concurrency, write concurrency, and memory for Small, Medium, or Large. You can also customize the resource configuration for full migration. By configuring resources for the Full-Import component, you can limit the resource consumption of a task during the full migration phase. Notice
For custom configurations, the minimum value is 1, and only integers are supported.
Handling Strategy When Target Table Has Records The handling strategies include Ignore and Stop Migration: - If Ignore is selected, when a target table has data, if the original data conflicts with the data to be written, OMS logs the conflicting data and retains the original data unchanged.
- If Stop Migration is selected, when a target table has data, an error is reported during full migration, indicating that migration is not allowed. In this case, you must handle the data in the target table before continuing the migration.
Notice
If you click Resume after an error occurs, OMS will ignore this configuration option and continue migrating table data. Proceed with caution.
</ ul>
Incremental Synchronization
The following parameters are displayed only if you have selected Incremental Synchronization in the Select Migration Type step.
ParameterDescriptionIncremental Synchronization Rate Limit You can decide whether to enable the incremental synchronization rate limit based on your actual needs. If enabled, set the RPS (the maximum number of data rows that can be synchronized to the target per second during incremental synchronization) and BPS (the maximum amount of data that can be synchronized to the target per second during incremental synchronization). Note
The RPS and BPS set here are only for throttling. The actual achievable performance during incremental synchronization is limited by factors such as the source, target, and instance specifications.
Incremental Log Pull Resource Configuration You can select the default memory for Small, Medium, or Large. You can also customize the resource configuration for incremental log pull. By configuring resources for the Store component, you can limit the resource consumption for log pulling during the incremental synchronization phase of a task. Notice
For custom configurations, the minimum value is 1, and only integers are supported.
Incremental Data Write Resource Configuration You can select the default write concurrency and memory for Small, Medium, or Large. You can also customize the resource configuration for incremental data write. By configuring resources for the Incr-Sync component, you can limit the resource consumption for data writing during the incremental synchronization phase of a task. Notice
For custom configurations, the minimum value is 1, and only integers are supported.
Incremental Record Retention Time The duration for which incremental parsed files are cached in OMS. A longer configured retention time requires more disk space for the Store component. Notice
When the source is an SQL Server database, setting an incremental synchronization start timestamp is not supported. The start timestamp defaults to the time when incremental synchronization starts.
Reverse Incremental
The parameters in this section are displayed only if you have selected Reverse Increment in the Select Migration Type step. The configuration parameters for reverse incremental are the same as those for incremental synchronization. You can select Reuse Incremental Synchronization Configuration in the upper-right corner.
Before configuring reverse incremental, the user of the source SQL Server database must have the permissions to create objects and update data (
db_ddladminanddb_datawriter). Otherwise, the pre-check will report an error.
If the configuration parameters on the page do not meet your requirements, you can click Parameter Configuration at the bottom of the page for more specific configuration. OMS supports parameter templates for SQL Server-type Stores. If you have a configured task template or component template, you can reference it here.
Click Precheck to have the system perform a pre-check on the data migration task.
During the Precheck step, OMS checks whether the database user's read/write permissions, network connection, log restore mode and backup status, and SQL Server Agent service status meet the requirements. The data migration task can only be started after all check items pass. If the pre-check reports an error:
You can troubleshoot and resolve the issue, then re-execute the pre-check until it succeeds.
You can also click Skip in the Actions column for the failed pre-check item. A dialog box appears, explaining the specific impact of skipping this operation. After confirming it is okay to skip, click OK in the dialog box.
Click Start Task. If you do not need to start the task immediately, click Save to go to the details page of the data migration task, where you can start it manually as needed.
You can click Configure Validation Task in the upper-right corner of the data migration details page to compare data differences between the source and target databases. This link supports Row Count Validation and Full Validation: Row count verification compares the record counts of tables at both ends, while full verification compares the content of the selected data. This link does not support Incremental Validation. Even if incremental synchronization is enabled for the migration task, only the first two verification types can be selected. The validation object only supports tables. For details, see Create a data verification task.
OMS supports modifying migration objects during the execution of a data migration task. For details, see View and modify migration objects. After a data migration task is started, it is executed sequentially according to the selected migration type. For details, see the content in the "View migration details" section of View the details of a data migration task.
Note
When a data migration task includes incremental synchronization, OMS creates a CDC capture instance for the new table before adding it or modifying the matching rules. When a table is removed from the source or target or when the matching rules reduce the number of tables, OMS synchronously disables the CDC capture instance for the removed table.
Notice
If you use matching rules to select migration objects, the original task only selected schema migration + incremental synchronization, and there is a delay in incremental replay, after expanding the rules, data written to the new table before the new log collection component starts may be missed during synchronization, even if the table addition ticket ultimately succeeds. In this combination, you should complete the table addition and confirm that incremental collection has started before writing begins to the new table. If data has already been written during this period, verify and backfill the differences before using the target table.