Data Transmission Service

Invalid Default Value for Fields: Invalid default value for xxx

2023-10-31 02:22:09

Scenario

An error occurred while DTS was migrating structs based on a task that contains struct migration or synchronization. The following error message appears: Invalid default value for xxx.

Keywords

Invalid default value for xxx

Possible Causes

The SQL modes of the destination database include NO_ZERO_IN_DATE and NO_ZERO_DATE, while the default values for the time-type columns specified in the table definition contain 0000-00-00 00:00:00.

Solutions

  1. Check the table creation statement of the source database and the SQL modes of the destination database. After you confirm that the error is caused by the SQL mode configuration, use one of the following methods to fix the error:

    Modify the default values of the related columns in the source database. Do not set the default value to 0000-00-00.
    Modify the SQL modes of the destination database by removing NO_ZERO_IN_DATE and NO_ZERO_DATE.

  2. If this error is not caused by the SQL mode configuration, contact DTS technical support for troubleshooting.


YYX2pBK0nCX6