Errors occur when DTS synchronizes DML/DDL data to the destination database table. They are usually caused by some problems with the destination database.
First of all, DTS does not support the scenario where triggers are built on the destination table. In this case, any error may occur (including data quality problems such as data inconsistency.)
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '3205385' for key 'PRIMARY'.
Reason: This error is generally caused by the trigger on the destination table 'xxx'.'xxx'. (DTS operation on the 'xxx'.'xxx' table does not cause primary key or unique key conflicts but is caused by the internal sql of the trigger on this table.)
Solution: Delete the trigger on destination table 'xxx'.'xxx' and click restart to resume
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '***' in 'field list'.
Reason: This error is generally caused by the user deleting the column of ' *' on the destination table 'xxx'.'xxx'. (If the user really does not need the column, the column can be deleted from the source table, and DTS will synchronize the DDL of the deleted column to the destination table automatically. If the user wants to keep the column on the source table, the user should choose to filter the column when creating the task.)
Solution: The user manually creates the column ' 'on the destination table 'xxx'.'xxx' and clicks restart* to resume.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'xxx.xxx' doesn't exist.
Reason: This error is generally caused by the user deleting the table on the destination table 'xxx'.'xxx'. (If the user really does not need the column, the column can be deleted from the source table, and DTS will synchronize the DDL of the deleted column to the destination table automatically. If the user wants to keep the column on the source table, the user should choose to filter the column when creating the task.)
Solution: The user manually creates the table 'xxx'.'xxx' on the destination database and clicks restart to resume.
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column '***' cannot be null.
Reason: This error is generally caused when the user modifying the column on the destination table 'xxx'.'xxx' is not allowed to be null.
Solution: The user changes the column manually to allow null on the destination database table and clicks restart to resume.
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (...).
Reason: This error is generally caused by the user's destination database not supporting session-level prohibition of foreign key checking (MySQL branch version developed by the user.)
Solution: The user deletes the foreign key constraint of the response from the destination database and table manually and clicks restart to resume.
java.sql.SQLException: The MySQL server is running with the --read-only option so it cannot execute this statement.
Reason: The destination database is set to read-only, which may be due to user operation or RDS instance expiration (full disk/internal primary and secondary switching.)
Solution: The user can set the destination database to be writable or renew the RDS instance (upgrade RDS instance disk space) and then click restart to restore it.
java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction.
Reason: The destination database may have long queries or DDL statements related to the table.
Solution: After the related long query or DDL execution of the destination database is completed, click restart to resume.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: INSERT(DELETE/UPDATE) command denied to user 'xxx'@'***' for table '*'.
Reason: The target RDS disk is full or locked out.
Solution: After upgrading RDS disk space or renewing, click restart to resume.
com.mysql.jdbc.PacketTooBigException: Packet for query is too large (12014078 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
Reason: The max_allowed_packet setting of the destination database is too small.
Solution: Resize the max_allowed_packet with high permissions on the destination instance (SET global max_allowed_packet=) and click restart* to resume
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool.
Reason: The destination Redis library cannot be connected.
Solution: After confirming the destination Redis library is accessible, click restart to resume.
This article was originally published on developer.aliyun.com/.
Alibaba Cloud_Academy - September 16, 2022
tianyin - November 8, 2019
OpenAnolis - July 19, 2023
ApsaraDB - January 16, 2023
Alibaba Clouder - August 1, 2017
XianYu Tech - November 22, 2021
An on-demand database hosting service for SQL Server with automated monitoring, backup and disaster recovery capabilities
Learn MoreSupports data migration and data synchronization between data engines, such as relational database, NoSQL and OLAP
Learn MoreTair is a Redis-compatible in-memory database service that provides a variety of data structures and enterprise-level capabilities.
Learn MoreTSDB is a stable, reliable, and cost-effective online high-performance time series database service.
Learn MoreMore Posts by ApsaraDB