Synchronize DDL operations between MySQL-compatible tenants of OceanBase Database

2025-10-09 03:34:24  Updated

When you migrate data from the MySQL compatible mode of OceanBase Database to the MySQL compatible mode of OceanBase Database, DDL synchronization is supported.

Notice

If the source has created an index and the target already contains it, OMS automatically ignores the index and does not interrupt the operation.

Supported DDL operations for synchronization

  • Add a column using the ALTER TABLE ADD COLUMN statement

  • Modify a column using the ALTER TABLE MODIFY COLUMN statement.

    Notice

    Only increasing the column length is supported, and changing the column type is not supported.

  • Modify the default value of a column by using the ALTER TABLE ALTER COLUMN SET DEFAULT or ALTER TABLE ALTER COLUMN DROP DEFAULT statement.

  • Drop a column using the ALTER TABLE DROP COLUMN statement.

  • Create a table CREATE TABLE

    Notice

    CREATE TABLE AS SELECT is not supported.

  • Drop a table DROP TABLE

  • Truncate a table TRUNCATE TABLE

  • Create an index by using the CREATE INDEX or ALTER TABLE ADD INDEX statement.

  • Drop an index by using the DROP INDEX or ALTER TABLE DROP INDEX statement.

  • Rename a table by using the RENAME TABLE or ALTER TABLE RENAME statement.

Limitations on DDL synchronization

  • If the tables to be synchronized involve DDL changes that are not supported, the migration task may fail and unrecoverable data exceptions may be caused.

  • Do not frequently perform DDL operations on a table. After the store finishes a DDL operation (which can be determined based on the timestamp), it proceeds to the next DDL operation. Otherwise, the store may exit unexpectedly or cause data issues that cannot be recovered.

  • Before you create a store and when a store is being started, make sure that no DDL operations are performed. If log pulling is involved, make sure that no DDL operations are performed from the start time when logs are pulled to the current time. Otherwise, the store may exit unexpectedly or cause data problems that cannot be recovered.

  • The table names before and after the RENAME TABLE statement must be both in or both not in the list of tables to be synchronized.

Contact Us