All Products
Search
Document Center

:Rename a database table

Last Updated:Mar 27, 2023

This topic describes how to rename databases and tables.

Scenarios

By default, synchronization objects, such as databases and tables, have the same names in the source and destination. You can rename synchronization objects in the destination to map the database and table names between the source and the destination. The renaming feature applies to multi-table aggregation scenarios and scenarios where the object names in the test and production environments are inconsistent.

Note

The multi-table aggregation feature is mainly used to synchronize data from DRDS and MyCat data sources to the same table in the destination database.

Limits

  • You can rename databases and tables only when you synchronize data from an OceanBase database to an AnalyticDB MySQL database or another OceanBase database.

  • Data transmission only allows you to rename objects in the step of selecting synchronization objects when you configure a data synchronization project.

  • Do not rename objects after the data synchronization project is started. Otherwise, the data synchronization project may fail.

Procedure

  1. Create a data migration project and configure it to the Select Synchronization Objects step.

    For more information, see the topic about creating a data synchronization project between the corresponding data sources in the Data synchronization chapter.

  2. Select the synchronization object, and then move the pointer over the target object in the Destination Objects list on the right of the Specify Synchronization Scope section.

  3. Click Rename.

    image
  4. Enter a new name for the object in the destination database.

    image
  5. Click OK.

    image
  6. Complete subsequent project settings as prompted.