All Products
Search
Document Center

Data Transmission Service:Switch the direction of a two-way synchronization instance

Last Updated:Nov 10, 2023

This topic describes how to switch the direction of a two-way synchronization instance by using Data Transmission Service (DTS).

Background information

To ensure the stability of two-way data synchronization, DTS allows you to synchronize DDL operations only in the current forward task to the destination database. DDL operations are not synchronized in the current reverse task. If you need to synchronize DDL operations in the current reverse task to ensure data consistency, you can switch the direction of a two-way synchronization instance, perform DDL operations, and then synchronize the DDL operations.

Prerequisites

  • A two-way synchronization instance is created. For more information, see the relevant topics in the Overview of data synchronization scenarios.

  • The forward and reverse task of the two-way synchronization instance are in the Running or Paused state.

Usage notes

  • The direction of a distributed two-way synchronization instance cannot be switched.

  • If data changes in the source or destination database when the direction of a two-way synchronization instance is being switched, data inconsistency may occur between the source and destination databases.

  • After the direction of a two-way synchronization instance is switched, the directions and positions of the original forward and reverse tasks are interchanged.

    Important

    DDL operations are synchronized to the destination database only in the current forward task.

  • If you want to synchronize DDL operations in the current reverse task to ensure data consistency after the direction of a two-way synchronization instance is switched, you must switch the direction again and then synchronize the DDL operations.

Procedure

  1. Go to the Data Synchronization Tasks page.
    1. Log on to the Data Management (DMS) console.
    2. In the top navigation bar, click DTS.
    3. In the left-side navigation pane, choose DTS (DTS) > Data Synchronization.
    Note
  2. In the upper-left corner of the page, select the region in which you want to create the data synchronization task.

  3. On the Data Synchronization Tasks page, find the two-way synchronization instance for which you want to switch the direction, click the ... icon and select Switch Direction.

  4. In the message that appears, click OK.

    After the forward and reverse tasks enter the Running state, the direction of the two-way synchronization instance is switched.