All Products
Search
Document Center

Data Transmission Service:Source database connectivity

Last Updated:Nov 03, 2023

Data Transmission Service (DTS) prechecks whether DTS servers can connect to the source database. This topic describes the causes of connection failures and how to troubleshoot the failures.

The source database may fail to be connected during the connectivity precheck due to the following causes.

The database account or password is invalid

Sample error

Access denied for user 'XXX'@'XXX' (using password: YES)

Troubleshooting

Use a command-line tool or client to connect to the source database and verify whether the database account and password are valid.

Common errors:

  • An Alibaba Cloud account is entered instead of a database account.

  • The database account that you entered does not exist.

  • An invalid password is entered.

Solution

Log on to the DTS console and modify the data migration task. Enter a valid database account and password, and then perform a precheck again.

Important

If the source database is an ApsaraDB for Redis instance or a Tair instance, enter the password in the correct format based on the type of the account.

  • If you use the default account whose username is the same as the instance ID, enter only the password.

  • If you use a custom account, enter the password in the following format: <Custom account>:<Password>. For example, if the account that you enter for an ApsaraDB for Redis instance is admin and the password is Rp829dlwa, you must enter admin:Rp829dlwa as the password.

The source database disallows the access from the IP address that you use to access the source database

Troubleshooting

  • Use a command-line tool or client to connect to the source database. If the connection is successful, the source database may disallow the access from the IP address that you use to access the source database.

  • If the source database is a self-managed MySQL database, you can use a MySQL client to connect to the database and run the following command:

    SELECT HOST FROM mysql.user WHERE user='username',password='password';
    Note

    Replace username and password in the preceding command with the database account and password that are specified for the data migration task.

    Check whether the IP addresses of DTS servers are included in the IP address whitelist in the command output. For more information, see Add the CIDR blocks of DTS servers to the security settings of on-premises databases.

  • If the source database is an SQL Server database, check whether a firewall is configured for the server on which the database is deployed. In addition, check whether the endpoint or triggers in the source database disallow the access from the IP address that you use.

  • If the source database is an Oracle database, check the configuration file sqlnet.ora of the Oracle database. If the TCP.VALIDNODE_CHECKING parameter in the sqlnet.ora configuration file is set to yes, the source database disallows the access from the IP address that you use.

Solution

  • If the source database is a self-managed MySQL database, run the following command to grant permissions to the database account:

    GRANT ALL ON *.* TO 'username'@'%';
    Note

    Replace username in the preceding command with the database account that is specified for the data migration task.

  • If the source database is an SQL Server database, disable the firewall or triggers.

  • If the source database is an Oracle database, set the TCP.VALIDNODE_CHECKING parameter to no and restart the process.

Log on to the DTS console to perform a precheck again.

A firewall is configured for the server on which the source database is deployed

Troubleshooting

  • If the server on which the source database is deployed runs Windows, find Windows Defender Firewall from the Control Panel to check whether a firewall is configured for the server.

  • If the server on which the source database is deployed runs Linux, run the iptables -L command to check whether a firewall is configured for the server.

Solution

Disable the firewall, and then log on to the DTS console to perform a precheck again.

Network connections fail

If the connectivity test still fails after the preceding troubleshooting, network connection issues may occur between the DTS server and the source database.