This topic describes how to use the migration assessment service to execute incremental DDL assessment.
Background
You can use the migration assessment service to assess the syntax compatibility of a series of continuous DDL statements in OceanBase Database. The differences between incremental DDL assessment and online/offline assessment are as follows:
In online/offline assessment, DDL statements are independent of each other.
In incremental DDL assessment, syntax compatibility is assessed by considering the association between DDL statements.
For example, the following three DDL statements are considered compatible in online/offline assessment. In incremental DDL assessment, however, the statements are considered incompatible, because the a_id field in Table B is the foreign key that references the id field in Table A, which means that INT values in B.a_id cannot be converted into VARCHAR(10) values.
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);Limitations
Only users with the AliyunOceanBaseFullAccess permission can create incremental DDL assessment tasks. For more information about the permission policy, see AliyunOceanBaseFullAccess.
Procedure
Log on to the
ApsaraDB for OceanBase console.In the left-side navigation pane, choose 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 following parameters.
Parameter
Description
Source Database Type
Select the type of the source database from the drop-down list. At present, only a MySQL database is supported.
Source Database Version
Select the version of the source database from the drop-down list. At present, MySQL 5.6, 5.7, 8.0, and 8.0.13 are supported.
Target Database Type
Select the type of the target database from the drop-down list. At present, only an OceanBase database in MySQL-compatible mode (OBMySQL) is supported.
Target Database Version
Select the version of the target database from the drop-down list.
DDL Content
Enter the DDL statements for assessment.
NoteIf the table to be modified in a DDL statement is an existing table, you need to provide its schema information. Otherwise, you will be prompted that the table does not exist.
After the configuration, click Submit Assessment.
In the Incremental DDL Assessment dialog box, view information in the Assessment Result and Assessment Details sections.
Reasons of incompatibility are provided for incompatible DDL statements in the Assessment Details section.