This topic provides answers to commonly asked questions about data synchronization to AnalyticDB for MySQL by using Data Transmission Service (DTS).

What do I do if online DDL operations occur in a source database when I perform partial database synchronization?

  • Problem description: A temporary table does not exist or errors are reported.
  • Solution:
    • Delete the source tables for which errors are reported from the synchronization objects, and then restart the data synchronization task.
    • Delete the source tables for which errors are reported from the destination database. When the data synchronization task does not have latencies, add the source tables to the synchronization objects.

What do I do if values that are not supported by AnalyticDB for MySQL exist in a source database?

  • Problem description: Errors appear in fields such as time and date. An example of such errors is Cannot parse "2013-05-00 00:00:00": Value 0 for dayOfMonth must be in the range [1,31]].
  • Solution: You cannot write invalid values in AnalyticDB for MySQL. You need to take the following steps to solve this problem:
    • If the task is in the Initialization and Full Synchronization stage, you must change the values of the source table to valid values. For example, change 2013-05-00 00:00:00 to 2013-05-01 00:00:00.
    • If the task is in the Incremental Synchronization stage, you must remove the source table from the synchronization objects, change values in the source table to valid values, add the table to the synchronization objects, and then restart the task.
    • If errors are reported when you perform full database synchronization during the incremental synchronization stage, you can submit a ticket to AnalyticDB for MySQL technical engineers for troubleshooting.

What do I do if field data types cannot be changed during synchronization?

Problem description: Errors appear when you change field data types. Examples of such errors are 'id' is LONG type, Can't change column type to DECIMAL and modify precision is not supported, col=id, type decimal, old=11, new=21.

Solution: When you synchronize data, you can change the field data types of a source table. You can only convert field data types based on the following sequence from left to right: TINYINT > SMALLINT > INT > BIGINT and FLOAT > DOUBLE.
Note You can only convert data types that have a fewer number of bytes to those of larger numbers of bytes, or convert data types of lower precision to those of higher precision. For example, you can convert TINYINT to INT but not the other way around.
Errors are reported when you try to change field types that cannot be changed. You can solve this problem in the following ways:
  • When you perform full database synchronization, you can create a new table by using a different name in AnalyticDB for MySQL. The table schema is the same as that of the source table. You must execute the INSERT INTO SELECT statement to write data of the source table for which an error is reported to the new table, delete the source table, execute the RENAME statement to change the name of the new table to that of the source table, and then restart the data synchronization task.
  • When you perform partial database synchronization, you must delete the table for which an error is reported from the synchronization objects, and then restart the data synchronization task. After latencies of the task disappear, you must add the table to the synchronization objects.

What do I do if an error is reported when my disk is full?

Problem description: An error message of disk is over flow is reported.

Solution: The error indicates that the disk of the AnalyticDB for MySQL cluster is full and you must resize the cluster or delete some data to free disk space. Restart the data synchronization task when the disk has sufficient space.

What do I do if an error is reported when I write null values into primary keys?

Problem description: Errors appear when you write null values into primary keys. An example of such an error is syntax error :column 'TABLE.COL' is primary key, can not set null.

Solution: Currently, you cannot write null values into primary keys for AnalyticDB for MySQL. You can synchronize a table after you change its primary key to a value other than null. Otherwise, you cannot synchronize the table.

What do I do if an error is reported when I synchronize tables without primary keys?

Problem description: When you perform full database synchronization by using DTS, tables without primary keys in the source database cannot be synchronized to the destination database. The error indicates that the tables do not exist.

Solution: You cannot synchronize tables without primary keys to AnalyticDB for MySQL by using DTS. To solve this problem, you must create a table in the destination database and ensure that the new table has primary keys. After you create the table, restart the data synchronization task.

What do I do if the network connection is unstable?

Problem description: Get inc_checkpoint config from Meta failed or Read timed out is reported.

Solution: If a timeout error is reported when a data synchronization task attempts to connect to a source database, you can try to restart the task.