This topic describes how to resolve an error that is reported for a table in a data synchronization instance of Data Transmission Service (DTS) by reselecting the objects to be synchronized.

Prerequisites

  • No business application is reading data from the destination database, or business applications can stop reading data from the destination database for a short period of time.
  • The source and destination databases are running as expected.
  • In addition to the table for which the error is reported, the data synchronization instance has other objects to synchronize.
  • The data synchronization instance is not in the Modifying Objects state.

Usage notes

  • If you modify the objects to be synchronized for a DTS instance, the DTS instance is automatically restarted. During this period, data inconsistency between the source and destination databases may occur.
  • You must clear the data of the table for which the error is reported in the destination database. Before you perform the operations described in this topic, take note of the following items:
    • Make sure that only DTS writes data to the table in the destination database, or data in the table in the destination database can be cleared.
    • Make sure that the business that relies on the table in the destination database is not affected.

Troubleshooting process

  1. Remove the table or frequently-updated table for which the error is reported from the data synchronization instance.
  2. Clear the data of the table for which the error is reported in the destination database.
  3. Add the table to the data synchronization instance again.

Procedure

  1. Go to the Data Synchronization Tasks page.
    1. Log on to the DMS console.
    2. In the top navigation bar, click DTS.
    3. In the left-side navigation pane, choose DTS (DTS) > Data Synchronization.
  2. From the drop-down list to the right of Data Synchronization Tasks, select the region in which your data synchronization instance resides.
    Note If you use the new DTS console, select the region in which your data synchronization instance resides in the top navigation bar.
  3. Remove the table or frequently-updated table for which the error is reported from the objects to be synchronized based on the synchronization scenario.
    Note For more information about how to view the frequently-updated table, see View hot data.
    • If the database to which the table belongs is selected as an object to be synchronized, perform the following steps to remove the table:
      1. Find the instance on the Data Synchronization Tasks page and click Reselect Objects in the Actions column. Reselect the objects to be synchronized
      2. In the Selected Objects section, select the database to which the table belongs and click the zuoyi icon to remove the database. Full Database
      3. In the Source Objects section, select the tables within the specified database, except for the table for which the error is reported, and click the youyi icon to add the tables to the Selected Objects section. Table shard
        Note For more information, see Remove an object from a data synchronization task.
      4. Click Next: Advanced Settings and Next: Save Task Settings and Precheck.
      5. Wait until Success Rate becomes 100%, and click Changed. Return.
    • If the table for which the error is reported is selected as an object to be synchronized, perform the following steps to remove the table:
      1. Find the instance on the Data Synchronization Tasks page and click Reselect Objects in the Actions column. Reselect the objects to be synchronized
      2. In the Selected Objects section, select the table for which the error is reported, and click the zuoyi icon to remove the table. Remove an object
      3. Click Next: Advanced Settings and Next: Save Task Settings and Precheck.
      4. Wait until Success Rate becomes 100%, and click Changed. Return.
  4. Clear the data of the table in the destination database.
    For example, you can execute the following statements to clear the data of a table in a MySQL database:
    TRUNCATE TABLE XXX;
    DROP TABLE XXX;
  5. Add the table as an object to be synchronized again.
    1. Find the instance on the Data Synchronization Tasks page and click Reselect Objects in the Actions column. Reselect the objects to be synchronized
    2. In the Source Objects section, select the table for which the error is reported and click the youyi icon to add the table to the Selected Objects section. Add a table
      Note For more information, see Add an object to a data synchronization task.
    3. Click Next: Advanced Settings and Next: Save Task Settings and Precheck.
    4. Wait until Success Rate becomes 100%, and click Changed. Return.
  6. Wait until the instance is restarted and check whether an error is reported.