Problem description

To ensure successful data migration, DTS checks whether DTS servers can connect to the destination database during precheck. This topic describes the causes of check failures and how to troubleshoot the failures.

Possible cause

This issue may be caused by the following reasons:

Solution

The database account or password is invalid

Detection method

You can check whether the database account and password for the data migration task are correct from a host that can connect to the destination database.
Note: you can verify the database account and password on the server where the destination database resides.

Solution

Log on to the DTS console, enter the correct account and password, and perform another PreCheck.

The destination database disallows access from external IP addresses

Detection method

  • You can enter the database account and password specified for the data migration task on the server where the destination database resides. If the server can connect to the destination database, the destination database may disallow access from external IP addresses.
  • If the destination database is a MySQL database, you can use a MySQL client to connect to the database and run the following SQL statement: Check whether the authorized IP address list includes the CIDR blocks of DTS servers. For more information, see the IP address whitelist required for DTS migration, synchronization, and on-premises database subscription.
    select host,user,authentication_string,password_expired,account_locked from mysql.user WHERE user='[$Username]';
    Note: replace [$Username] with the database account that is specified in the data migration task.
  • If the destination database is an SQL Server database, check whether a firewall is set up for the Server where the database resides. You can also check whether endpoints or triggers in the destination database disallow access from external IP addresses.
  • If the destination database is an Oracle database, check the sqlnet.ora configuration file of the destination database to determine whether the configuration items tscdvalidnode_checking is yes. yes: the destination database disallows access from external IP addresses.

Solution

  1. Select a method to rectify the issue based on the type of the target database.
    • If the destination database is a MySQL database, you can run the following SQL statement to reauthorize the database account.
      GRANT ALL PRIVILEGES ON *. * TO '[$Username]'@'%' IDENTIFIED BY '[$Password]' WITH GRANT OPTION;
      Note: and [ replace $Username] replace [$Password] with the account and Password that are specified in the data migration task.
    • If the destination database is an SQL Server database, disable the firewall or triggers.
    • If the destination database is an Oracle database, change the value of the ts1,validnode_checking item to no, and restart the process.
  2. After you rectify the issue, log on to the DTS console and run the PreCheck again.

A firewall is configured for the network or server where the destination database resides

Detection method

Please perform the following inspection steps according to the on-site conditions:

  • Check whether the server where the database resides has a firewall enabled and firewall policies configured.
    • If the server where the destination database resides runs Windows, navigate to the control panel of the server, and check whether Windows Firewall is configured.
    • If the server where the destination database resides is Linux, run the iptables-L command to check whether a firewall policy has been configured for the server.
  • Check whether the network firewall that hosts your database restricts the CIDR blocks of the DTS servers. This topic takes cloud firewall as an example.
    1. Log on to the Cloud Firewall console, in the left-side navigation pane, click access control.
    2. Check whether Cloud Firewall has a policy that prohibits the CIDR block of DTS. For more information, see the IP whitelist required for migrating, synchronizing, or subscribing to on-premises databases.

Solution

Select the following steps based on the on-site conditions:

  • The server has enabled the firewall
    • Disable the firewall for the server, log on to the DTS console, and run the PreCheck again.
      Note: this method applies to both Windows and Linux.
    • Add the CIDR blocks of DTS servers to the whitelist of the destination instance. For more information, see set whitelists and security groups .
  • The network firewall restricts the CIDR block of DTS
    Temporarily disable the network firewall that hosts the database or add the CIDR blocks of DTS to the whitelist. To use cloud firewall as an example, you can delete the policies that block CIDR blocks of DTS.

Network connection problem

If the connectivity check still fails after the preceding troubleshooting, the network between DTS servers and the destination database may be unavailable. You can submit a ticket to contact Alibaba Cloud technical support.

Application scope

  • Data Transmission Service (DTS)