Connect a Data Transmission Service (DTS) instance to a database deployed inside a virtual private cloud (VPC) using a VPC data channel. This approach is required when the database has no public internet access and you need to run data synchronization, migration, or change tracking tasks.
Prerequisites
Before you begin, ensure that you have:
A database instance deployed in a VPC
Reviewed the limits and usage notes for the VPC data channel. For details, see Limits
Create two vSwitches
DTS requires two vSwitches in different zones within the VPC to establish a VPC data channel.
For supported regions and zones, see What is a VPC data channel?
Log on to the VPC console.
In the left navigation pane, click vSwitch.
Select the region where the target VPC is located.
On the vSwitch page, click Create vSwitch.
Configure the first vSwitch: set Region, VPC, Name, Zone, and IPv4 CIDR, then click Add to configure the second vSwitch.
The two vSwitches must be in different Zone values, and their IPv4 CIDR ranges must not overlap. For parameter details, see Create and manage vSwitches.
Click Create.
Set up the DTS instance
The following steps use a data synchronization instance as an example. The same approach applies to data migration and change tracking instances.
Go to the Data Synchronization page using one of the following entry points:
DTS console
Log on to the DTS console.
In the left navigation pane, click Data Synchronization.
In the upper-left corner, select the region where the instance resides.
DMS console
The steps may vary depending on your DMS console mode and layout. For details, see Simple mode and Customize the layout and style of the DMS console.
Log on to the DMS console.
In the top navigation bar, move the pointer over Data + AI and choose DTS (DTS) > Data Synchronization.
From the drop-down list to the right of Data Synchronization Tasks, select the region.
Click Create Task to open the task configuration page.
Configure the source and destination databases. For a database connecting through a VPC data channel, set the following parameters:
Parameter Description Access method Select Express Connect, VPN Gateway, or Smart Access Gateway. Instance region Select the region where the VPC of the database instance resides. Connected VPC Select the VPC to which the database instance belongs. Primary and Secondary vSwitches for VPC Data Channel vSwitch (Primary) Select the primary vSwitch you created in the previous section. vSwitch (Secondary) Select the secondary vSwitch you created in the previous section. 
For all other parameters, see Overview of data synchronization solutions.
Click Test Connectivity and Proceed at the bottom of the page.
In the CIDR Blocks of DTS Servers dialog box, add the whitelist to the VPC's route configuration and the database's security allowlist. For instructions on configuring routes and allowlists for VPC-to-on-premises connectivity, see Connect a VPC to an on-premises data center or another cloud.
Click Test Connectivity. DTS creates the required network resources and tests the connection.
Complete the remaining task configuration. For details, see:
FAQ
What do I do if a network connectivity issue occurs when configuring a VPC data channel task?
This usually means the database instance is not reachable from the IP addresses assigned to the primary or secondary vSwitch. To diagnose the issue, log on to an ECS instance in each vSwitch and run a command such as telnet, ping, traceroute, or mtr to test connectivity to the database instance.
DTS uses the Java Database Connectivity (JDBC) protocol to communicate with the database. Ensure that you can use telnet to connect to the database instance address. For a MySQL database, a successful telnet connection returns the mysql_native_password characters, as shown below:

Can I use an existing vSwitch instead of creating new ones?
Yes. Any vSwitch in a zone that supports the VPC data channel is usable, as long as the primary and secondary vSwitches are in different zones.
How do I view the elastic network interfaces (ENIs) that DTS creates for the vSwitches?
Log on to the ECS console.
In the left navigation pane, choose Network & Security > ENIs.
In the upper-left corner, select the resource group and region where the resource is located.

In the VPC/vSwitch column, find the ENI.
The ENI name follows the format
**** endpoint ep-****.
Do I need to manually release the ENI after deleting the DTS instance?
No. The ENI is automatically released 15 days after the DTS instance is released.