Synchronize or migrate data between databases of different names

更新时间:
复制 MD 格式

Data Transmission Service (DTS) supports the object name mapping feature that lets you map the names of objects such as databases, tables, and columns when you configure a data synchronization or data migration task. This way, you can change the names of the objects that are synchronized or migrated to the destination database. You can use the object name mapping feature to synchronize or migrate data to specific databases, tables, or columns in the destination database, or create an object with the same schema as the source object but a different name in the destination database.

Scenarios

Note

The following scenarios also apply when the source and destination databases reside in the same database instance. In this case, data isolation is required. For example, you can isolate data using different database or table names.

Scenario

Description

Create an object in the destination database to receive data.

  • Data migration task: You must select Schema Migration for the Migration Types parameter, and select at least one of Full Data Migration and Incremental Data Migration.

  • Data synchronization task: By default, Incremental Data Synchronization is selected for the Synchronization Types parameter. You must also select Schema Synchronization, and select Full Data Synchronization as needed.

Specify the objects in the destination database that will receive the data. For example, you can aggregate data from multiple tables into a single large table.

You must create an object in the destination database in advance to receive data and ensure data compatibility.

  • Data migration task: You do not need to select Schema Migration for the Migration Types parameter.

  • Data synchronization task: You do not need to select Schema Synchronization for the Synchronization Types parameter.

Create an object in the destination database.

This scenario is supported only for data migration tasks. You need to select only Schema Migration for the Migration Types parameter.

Procedure

In the Configure Objects and Advanced Settings step of a data synchronization or data migration task, perform object name mapping. For more information about the usage notes and procedures, see Map object names.

FAQ

  • Does the mapping feature modify the object name of the source database instance?

    No. When you use the mapping feature, the system uses the mapping name you set to name the new object, and then creates or matches the object in the destination database instance.

  • What is the impact of using the object name mapping feature?

    If you use the object name mapping feature to rename an object, other objects that depend on this object may fail to be synchronized or migrated.

  • Am I able to use the object name mapping feature to modify the schema of databases and tables?

    This is not supported.