Help Center> Data Replication Service> Troubleshooting> Solutions to Failed Check Items> Database Parameters> Checking Whether the TIME_ZONE Values of the Source and Destination Databases Are the Same
Updated on 2023-05-23 GMT+08:00

Checking Whether the TIME_ZONE Values of the Source and Destination Databases Are the Same

MySQL Migration

Table 1 Checking whether the TIME_ZONE values of the source and destination databases are the same

Check Item

Whether the TIME_ZONE values of the source and destination databases are the same

Description

The migration fails because the TIME_ZONE values of the source and destination databases are different.

Failure Cause and Handling Suggestion

Failure cause: The TIME_ZONE or SYSTEM_TIME_ZONE values of the source and destination databases must be the same.

Handling suggestion: Change the TIME_ZONE value of the destination database to the same as that of the source database, or change the TIME_ZONE value of the source database to the same as that of the destination database.

Synchronization from Oracle to DDM

Table 2 Checking whether the TIME_ZONE values of the source and destination databases are the same

Check Item

Whether the TIME_ZONE values of the source and destination databases are the same

Description

The synchronization fails because the TIME_ZONE values of the source and destination databases are different.

Failure Cause and Handling Suggestion

Failure cause: The TIME_ZONE (TIMEZONE) or SYSTEM_TIME_ZONE value in the source database is inconsistent with that in the destination database, or there is a large difference between the times in the source and destination databases.

Handling suggestion: Change the TIME_ZONE(TIMEZONE) value in the source database to be consistent with the destination database or change the TIME_ZONE(TIMEZONE) in the destination database to be consistent with the source database or modify the destination database time to be consistent with the source database time.

  • To change the value of TIME_ZONE in the Oracle database, perform the following steps:
    1. Run the following statement to query the value of TIME_ZONE in the database:
      SELECT DBTIMEZONE FROM DUAL;
    2. Run the following statement to modify the value of TIME_ZONE in the database:
      ALTER DATABASE SET TIME_ZONE='Time zone';

      Example of changing the time zone to GMT+8:

      ALTER DATABASE SET TIME_ZONE='+08:00';
    3. Restart the database after changing the value of TIME_ZONE.

      SQL> shutdown immediate

      SQL> startup

  • To change the value of TIME_ZONE in the DDM database, perform the following steps:

    Log in to the DDM console and change the time zone.