Perform an incremental DDL assessment
This topic describes how to perform an incremental Data Definition Language (DDL) assessment using Migration Assessment.
Background information
Migration Assessment supports incremental DDL assessment. This feature assesses the syntax compatibility of a series of consecutive DDL statements in an OceanBase database. The difference between an incremental DDL assessment and an online or offline assessment is as follows:
In an online or offline assessment, each DDL statement is evaluated independently.
In an incremental DDL assessment, Migration Assessment considers the dependencies between consecutive DDL statements to evaluate syntax compatibility.
For example, consider the following three DDL statements. In an online or offline assessment, all three statements are evaluated as compatible. However, in an incremental DDL assessment, the final statement fails. This is because the a_id field in table B has a foreign key relationship with the ID field in table A. Changing the data type of B.a_id from INT to VARCHAR(10) is not allowed.
CREATE TABLE A (
id INT PRIMARY KEY,
name VARCHAR(50)
);
CREATE TABLE B (
id INT PRIMARY KEY,
a_id INT,
value VARCHAR(50),
FOREIGN KEY (a_id) REFERENCES A(id)
);
ALTER TABLE B MODIFY COLUMN a_id VARCHAR(10);Limits
Only users with the AliyunOceanBaseFullAccess permission can create incremental DDL assessment tasks. For more information, see AliyunOceanBaseFullAccess.
Procedure
Log on to the OceanBase Management Console .
In the navigation pane on the left, click Migration Assessment > Compatibility Assessment.
On the Assessment Tasks page, click Incremental DDL Assessment in the upper-right corner.
In the Incremental DDL Assessment dialog box, configure the parameters.
Parameter
Description
Source database type
Select the source database type from the drop-down list. Only MySQL is supported.
Source database version
Select the source database version from the drop-down list. MySQL 5.6, 5.7, 8.0, and 8.0.13 are supported.
Destination database type
Select the destination database type from the drop-down list. Only OceanBase Database for MySQL tenant (OBMySQL) is supported.
Destination database version
Select the destination database version from the drop-down list.
DDL content
Enter the DDL statements to assess.
NoteIf you modify an existing table, you must also provide the table schema of the table. Otherwise, an error message indicates that the table does not exist.
After you configure the parameters, click Submit Assessment.
In the Incremental DDL Assessment dialog box, view the Assessment Result and Assessment Details.
If any DDL statements are incompatible, the reason is provided in the assessment details.