Supported DDL operations
CREATE TABLENotice
You can create partitioned tables but cannot use
CREATE TABLE AS SELECTto create tables.DROP TABLETRUNCATE TABLEADD PARTITIONYou can add partitions and subpartitions by using RANGE or LIST partitioning. HASH partitioning is not supported.
DROP PARTITIONYou can drop one or more partitions and subpartitions.
TRUNCATE PARTITIONYou can truncate one or more partitions and subpartitions.
RENAME TABLEandALTER TABLE RENAMEALTER TABLE ADD COLUMNALTER TABLE MODIFY COLUMNNotice
You can increase the column length, but you cannot modify the column type.
CREATE INDEXDROP INDEXAdding or dropping comments on tables or columns
Limitations
Only the DDL operations listed above can be synchronized. If a table to be synchronized involves unsupported DDL operations, the migration task may be interrupted, resulting in unrecoverable data inconsistencies.
Frequent DDL operations on a single table are not supported. Perform the next DDL operation only after the Store has completed the current operation based on the log position. Otherwise, the Store may exit unexpectedly or cause unrecoverable data errors.
Ensure that no DDL operations are performed for a period before you create a Store or while the Store is starting. If logs need to be pulled from an earlier point, ensure that no DDL operations are performed between the log pull point and the current time. Otherwise, the Store may exit unexpectedly or cause unrecoverable data errors.
The original and new table names in the
RENAME TABLEstatement must both be included in the list of tables to be synchronized.If you drop an unnamed primary key, the corresponding system-named constraint in the Oracle database, whose name starts with
SYS_C, is also dropped. During cross-database data migration or synchronization, such as from an Oracle database to OceanBase Database, the primary key names in OceanBase Database differ from those in the Oracle database. Therefore, primary keys cannot be dropped in OceanBase Database through synchronized DDL operations.When you migrate data from an Oracle-compatible tenant of OceanBase Database to an Oracle database, you cannot perform a DDL operation that changes a table with a primary key to a table without a primary key.
If a table in the Oracle-compatible tenant of OceanBase Database has a primary key, all DDL operations are supported.
If a table in the Oracle-compatible tenant of OceanBase Database has only a not-null unique key, a DDL operation that removes the not-null unique key is not supported.
Table creation DDL operations with the
CASE WHEN INDEXclause are not supported for synchronization.
