Synchronize DDL operations from the Oracle compatible mode of OceanBase Database to an Oracle database

2025-10-09 03:34:24  Updated

Supported DDL operations

  • CREATE TABLE

    Notice

    Partitioned tables are supported, but CREATE TABLE AS SELECT is not supported.

  • DROP TABLE

  • TRUNCATE TABLE

  • ADD PARTITION

    You can add partitions by using RANGE or LIST partitioning. HASH partitioning is not supported.

  • DROP PARTITION

    You can drop one or more partitions and subpartitions.

  • TRUNCATE PARTITION

    You can truncate one or more partitions and subpartitions.

  • RENAME TABLE and ALTER TABLE RENAME

  • ALTER TABLE ADD COLUMN

  • ALTER TABLE MODIFY COLUMN

    Notice

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

  • CREATE INDEX

  • DROP INDEX

Limitations on DDL synchronization

  • Only DDL operations listed in the preceding section are supported. If the table to be synchronized involves other types of DDL operations, the data migration task may fail and unrecoverable data exceptions may be caused.

  • 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 exit unexpectedly or cause unrecoverable data exceptions.

  • 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 exit unexpectedly or cause unrecoverable data exceptions.

  • 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.

  • If you delete an unnamed primary key, you delete Oracle system naming constraint (name starts with SYS_C). If you perform inter-database data migration or synchronization, for example, from an Oracle database to an OceanBase database, the primary keys in the OceanBase database cannot be deleted because they are named differently from those in the Oracle database.

  • When you migrate data from the Oracle compatible mode of OceanBase Database to an Oracle database, DDL operations that change a table with a primary key to a table without a primary key are not supported.

    • If a primary key (PK) exists in the Oracle compatible mode of OceanBase Database, all DDL operations are supported.

    • If the Oracle compatible mode of OceanBase Database contains only a not-null unique key (NOT NULL UK), DDL operations that remove the NOT NULL UK are not supported.

  • A table creation DDL operation that involves the CASE WHEN INDEX statement cannot be synchronized.

Contact Us