All Products
Search
Document Center

ApsaraDB for OceanBase:DDL synchronization between Oracle tenants of OceanBase Database

Last Updated:Mar 17, 2023

You can synchronize DDL operations when you migrate data between MySQL tenants of OceanBase Database.

Supported DDL operations for synchronization

  • Creating a table by using the CREATE TABLE statement.

    You can create partitioned tables but cannot use CREATE TABLE AS SELECT to create tables. HASH, RANGE, and LIST partitioned tables, and HASH, RANGE, and LIST sub-partition tables are supported.

  • Dropping a table by using the DROP TABLE statement.

  • Truncating a table by using the TRUNCATE TABLE statement.

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

  • Adding a column by using the ALTER TABLE ADD COLUMN statement.

  • Modifying a column by using the ALTER TABLE MODIFY COLUMN statement.

    Important

    You can increase the column length but you cannot modify the column type.

  • Creating an index by using the CREATE INDEX statement.

  • Dropping an index by using the DROP INDEX statement.

  • Adding or dropping a comment about a table or column by using the COMMENT statement.

Limits of DDL synchronization

  • If a table to be synchronized involves DDL operations that are not supported, the data migration project may be interrupted and unrecoverable data exceptions may occur.

  • Frequent DDL operations on a table are not supported. 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 unexpectedly exit and unrecoverable data exceptions may occur.

  • Make sure that no DDL operations are performed before you create a store and when a store is being started. If log pulling is involved, make sure that no DDL operations are performed during the period from the start time when logs are pulled to the current time. Otherwise, the store may unexpectedly exit and unrecoverable data exceptions may occur.

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

  • A table creation DDL operation that involves the case when index statement cannot be synchronized.

  • If you enable DDL synchronization, the index dropped in the source database by executing the DROP INDEX statement is also dropped in the destination database. This may cause index loss in the destination database.