Checking Whether the Source Database Tables Contain Primary Keys
MySQL Migration and Disaster Recovery
Check Item |
Whether the source database tables contain primary keys |
---|---|
Description |
If tables to be migrated in the source database do not contain primary keys, the migration may fail. |
Item to Be Confirmed and Handling Suggestion |
Item to be confirmed: The tables to be migrated in the source database do not contain primary keys. Handling suggestion: Create a primary key for the table. If the table does not have a primary key to uniquely identify every row and the network connection is unstable, the data in the destination database may be inconsistent with that in the source database. |
MySQL Synchronization
Check Item |
Whether the source database tables contain primary keys |
---|---|
Description |
If tables to be synchronized in the source database do not contain primary keys, the synchronization may fail. |
Failure Cause and Handling Suggestion |
Failure cause: The tables to be synchronized in the source database do not contain primary keys. Handling suggestion: Create primary keys for the tables to improve performance. |
Failure cause: In a many-to-one task, tables with no primary key that have the same name as those in the destination database are not allowed in the source database. Handling suggestion: Modify tables without primary keys, delete tables with no primary key from the destination database, or do not migrate tables without primary keys. |
|
Item to Be Confirmed and Handling Suggestion |
Item to be confirmed: The tables to be synchronized in the source database do not contain primary keys. Handling suggestion: Create a primary key for the table. If the table does not have a primary key to uniquely identify every row and the network connection is unstable, the data in the destination database may be inconsistent with that in the source database. |
Synchronization from Microsoft SQL Server to GaussDB(DWS)
Check Item |
Whether the source database tables contain primary keys |
---|---|
Description |
If the source database contains tables that do not have primary keys, a small amount of data may be inconsistent during synchronization. |
Item to Be Confirmed and Handling Suggestion |
Item to Be Confirmed: The table without a primary key lacks a unique identifier for rows. When the network is unstable, you may need to retry the task several times, or data inconsistency may occur. Handling suggestion: Add a primary key to a table, or do not synchronize the table that does not have a primary key. Statement for adding a primary key: ALTER TABLE table_name ADD CONSTRAINT constraint-name PRIMARY KEY (column_name); |
Oracle Synchronization
Check Item |
Whether the source database tables contain primary keys |
---|---|
Description |
If the source database contains tables that do not have primary keys, a small amount of data may be inconsistent during synchronization. |
Failure Cause and Handling Suggestion |
Failure cause: The table without a primary key lacks a unique identifier for rows. When the network is unstable, you may need to retry the task several times, or data inconsistency may occur. Handling suggestion: Add a primary key to a table, or do not synchronize the table that does not have a primary key. Statement for adding a primary key: ALTER TABLE table_name ADD CONSTRAINT constraint-name PRIMARY KEY (column_name); To synchronize tables with primary keys, do not perform the ALTER TABLE MOVE, SPLIT/MERGE, FLASHBACK, or ALTER TABLE SHRINK SPACE operation during full synchronization. Otherwise, data duplication may increase. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot