tencent cloud

Feedback

Database/Table Renaming

Last updated: 2024-07-08 19:41:52

    Overview

    Database/table renaming is also known as database/table mapping. In data migration scenarios, you can rename the databases/tables to be synced in order to avoid name conflicts between the source and target databases.
    ‍You can either rename a single database/table or rename them in batches. In batch renaming scenarios, there are three renaming methods: adding prefix/suffix, renaming uniformly, and replacing keyword.

    Note

    1. If you select an entire database or table as the migration object, you cannot rename a specified table. If you need to do so, select the target tables one by one when selecting migration objects.
    
    
    2. In batch renaming scenarios, if you select the uniform renaming method, the result of the data consistency check task will be "Inconsistent". You need to check data consistency on your own.
    3. In many-to-one migration scenarios:
    After you use the batch renaming feature, a structure initialization failure may be reported on the Task Progress tab in the console. The failure is reported because the target database already contains the structure information of this table. You can ignore this error because the data updates of this table will be migrated normally.
    In the task check stage, the check item "Target instance content conflict check" will report an error, which can be ignored. To skip this check item, submit a ticket.
    

    Renaming a Specified Database/Table

    1. Log in to the DTS console, select Data Migration on the left sidebar, and create a migration task.
    2. In the Set migration options and select migration objects step, in Selected Object on the right, hover over an object to be modified and click the displayed Edit icon.
    
    3. In the pop-up window, rename the object and click OK.
    Database name mapping: In the pop-up window, set the name of the database in the target instance.
    
    Table name mapping: In the pop-up window, set the name of the table in the target instance.
    

    Batch Renaming

    1. Log in to the DTS console, select Data Migration on the left sidebar, and create a migration task.
    2. In the Set migration options and select migration objects step, select the migration objects and click Batch Rename on the right of the Selected Object box.
    
    3. Set the batch renaming rules and click OK.
    Renaming Scope
    All selected databases and tables: All the selected databases and tables will be renamed in batches.
    All selected databases: All the selected databases will be renamed in batches.
    All selected tables: All the selected tables will be renamed in batches.
    Renaming Rule
    Add prefix/suffix
    
    Rename uniformly: The selected objects will be renamed uniformly, which is suitable for multi-table merge scenarios. Make sure that there is no primary key conflict when migrating table data from multiple sources to the target database.
    
    Replace keyword: The keyword in the names of the selected objects will be replaced uniformly. If an object name contains multiple keywords, only the first one will be replaced.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support