This topic describes the operations supported in a schema migration task.
Background
A schema migration task migrates data objects such as tables, indexes, constraints, comments, and views from the source database to the target database, and automatically filters out temporary tables. If the source database is not an OceanBase database, the data transmission service automatically performs data type conversion and SQL syntax concatenation based on the syntax definition of the mode of the target OceanBase Database tenant, and then replicates the data to the target database.
After the precheck is passed, the data migration task proceeds to the Schema Migration step. On the details page of the data migration task, you can click the Schema Migration tab to view the overall status, start time, end time, and total duration of the schema migration task. You can also check the migration progress of tables and views.
When the schema migration task is in the Running or Failed state, you can perform different operations on the migration objects in different states, as shown in the following table. If the schema migration task is in the Completed state, you can only view the syntax used to create the target objects.
Status | Supported operation |
Initializing | - |
DDL statements obtained/Creating/Pending | 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, and Modify Creation Syntax |
Not supported Note This status occurs when the target database does not support the creation syntax used in the source database. | Skip, Remove, View, and Modify Creation Syntax |
Prerequisites
The data migration task has been configured and started. For more information, see the topic about creating a data migration task between the corresponding data sources in the Data migration chapter.
Limitations
The operations in this topic apply 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 a target object
You can skip a target object in the Failed, Failed to obtain the DDL statement, or Not Supported state.
The prerequisite for skipping is that you have prepared the corresponding migration object in the target 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 task. Proceed with caution.
To skip a target object, perform the following steps:
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 a target object
You can remove a target object in the Failed, Completed, Completed (with conversion), Skipped, Failed to obtain the DDL statement, or Not Supported state.
After an object is removed, the current migration task does not migrate this object anymore. Proceed with caution.
To remove a target object, perform the following steps:
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 syntax used to create an object if the object is in the Failed or Failed to obtain the DDL statement state.
On the Schema Migration page, find the target object and click 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
On the Schema Migration page, find the target object and click View in the Actions column to view the table creation syntax.
You can view the table creation syntax of all target objects except those in the Initializing or Failed state.

If the table creation syntax is fully compatible, the DDL syntax executed is displayed. If it is not fully compatible, the converted syntax is displayed.
View the details of a failed object
You can view the error details of a target object in the Failed state.
On the Schema Migration page, find the target object and click View in the Actions column

In the View Details dialog box, view the cause of the failure.


