This topic describes the schema migration operations supported in a data migration project in OceanBase Migration Service (OMS).
Background
A schema migration task migrates data objects such as tables, indexes, constraints, comments, and views from the source database to the destination database, and automatically filters out temporary tables. When the source database is not OceanBase Database, the data types and SQL syntax are automatically converted and assembled according to the syntax definition standards of the destination tenant of OceanBase Database, and then replicated to the destination database.
After the precheck succeeds, the data migration project proceeds to the Schema Migration step. On the details page of the data migration project, you can click the Schema Migration tab to view the overall status, start time, end time, and total duration of the schema migration task, as well as the migration progress of tables and views.
If the schema migration task is in the Running or Failed state, the operations that you can perform on a target object varies with the state of the object. If the schema migration task is in the Completed state, you can only view the syntax used to create the target objects.
| State | Supported operation |
|---|---|
| Initializing | - |
| DDL statements obtained/Creating/Ready | View Creation Syntax |
| Completed/Completed (with conversion)/Skipped | Remove and View Creation Syntax |
| Failed | Retry, Skip, Remove, View Details, and Modify Creation Syntax |
| Failed to obtain the DDL statement | Retry, Skip, View Creation Syntax, and Modify Creation Syntax |
| Not Supported This state occurs when the destination does not support the creation syntax used at the source. |
Skip, Remove, View Creation Syntax, and Modify Creation Syntax |
Prerequisites
You have created and started a data migration project. For more information, see the topic about creating a data migration project between the corresponding data sources in Data migration.
Limitations
The operations in this topic are applicable to schema migration tasks in the Running or Failed state. If a schema migration task is in the Completed state, you can only view the syntax used to create the target objects.
A schema migration task can migrate tables, indexes, views, comments, and check constraints, but not temporary tables, events, types, functions, or procedures.
Retry a single failed object or all failed objects
You can retry a single object or all objects in the Failed or Failed to obtain the DDL statement state. You can directly retry an object, or retry an object after modifying it.
Retry a single failed object: On the Schema Migration page, find the failed object and click Retry in the Actions column.
Retry all failed objects
On the Schema Migration page, click Retry All Failed Objects in the upper-right corner.
In the dialog box that appears, click OK.
Skip an object
You can skip a target object in the Failed, Failed to obtain the DDL statement, or Not Supported state.
Notice
- The prerequisite for skipping is that you have prepared the corresponding migration object in the destination database. Otherwise, an error will occur in the Full Migration step.
- Once skipped, the target object will not be migrated in the current data migration project. Proceed with caution.
To skip a target object, perform the following operations:
On the Schema Migration page, find the target object and click Skip in the Actions column.
In the dialog box that appears, click OK.
Remove an object
You can remove an object in the Failed, Completed, Completed (with conversion), Skipped, Failed to obtain the DDL statement, or Not Supported state.
Notice
After an object is removed, the current migration project does not migrate this object anymore. Proceed with caution.
On the Schema Migration page, find the target object and click Remove in the Actions column.
In the dialog box that appears, click OK.
Modify the creation syntax of an object
You can modify the creation syntax of a target object in the Failed or Failed to obtain the DDL statement state.
On the Schema Migration page, find the target object and choose More > Modify in the Actions column.
In the Modify Table Creation Syntax dialog box, check the failed DDL statement and the error message, and modify the definition of the conversion result of the DDL statement.
Click Save.
View the creation syntax of an object
On the Schema Migration page, you can click View in the Actions column of the target object to view its creation syntax.
Note
You can view the creation syntax of an object in any state except Initializing and Failed.
If the object creation syntax is fully compatible, the DDL syntax executed on the OBServer node is displayed. If it is not fully compatible, the converted syntax is displayed.
View the failure details of an object
You can view the error details of a target object in the Failed state.
On the Schema Migration page, click View Details in the Actions column of the target object.
In the View Details dialog box, view the cause of the failure.