Help Center> Data Replication Service> Troubleshooting> Solutions to Failed Check Items> Database Parameters> Whether the Destination Schemas and Table Objects Are Consistent
Updated on 2024-05-09 GMT+08:00

Whether the Destination Schemas and Table Objects Are Consistent

Synchronization from GaussDB to GaussDB(DWS)

Table 1 Whether the destination schemas and table objects are consistent

Check Item

Whether the destination schemas and table objects are consistent

Description

Check whether the table structure objects in the destination database are the same as those in the source database.

Failure Cause and Handling Suggestion

Failure cause: The selected table does not exist in the destination database or the table structure is inconsistent with that in the source database.

Handling suggestion: If the selected table does not exist in the destination database, create a table in the destination database and ensure that the table structure in the destination database is the same as that in the source database.

Statement for creating a table:

CREATE TABLE table_name(Column_name data_type);

If the table structure is inconsistent with that in the source database, create missing columns in the destination database table, convert the names of columns with the same name but different letter cases in the destination database table to lowercase letters, or delete redundant columns from the source database table.

Item to be confirmed: Primary key columns of the source tables are inconsistent with those of the destination tables. If the primary key columns are inconsistent, the synchronization may fail or data may be inconsistent.

Handling suggestion: Change primary key columns of the destination tables to be consistent with those of the source tables.

Reference command:

alter table table_name add constraint pkey name primary key(c1, c2);

table_name indicates the table name, pkey_name indicates the primary key name, and c1 and c2 indicate the primary key columns.