Using DRS to Synchronize Data After Table Structure Changes by Adding or Deleting Tables
Execution Policy of DRS Synchronization Tasks When Tables Are Added or Deleted in the Source Azure SQL DB
If tables are added, deleted, or modified during incremental synchronization of the SSMS object structure, DRS synchronization may fail. After the incremental synchronization is complete, perform the following operations to restore the DRS synchronization task:
- If tables are added during synchronization of the source Azure SQL DB, manually add the new tables to the synchronization task based on the new table content in the SSMS incremental synchronization report and then restart the synchronization task.
- If tables are deleted during synchronization of the source Azure SQL DB, the DRS synchronization task fails. In this case, manually delete the tables from the synchronization task based on the deleted table content in the SSMS incremental synchronization report and then resume the synchronization task.
Execution Policy of DRS Synchronization Tasks When Table Structures Are Changed in the Source Azure SQL DB
If the table structure changes during synchronization of the source Azure SQL DB, data may be inconsistent or the task may fail because CDC does not record DDL changes. (For example, if a column is added to the source, CDC does not record changes related to the new column. As a result, the new column information is missing after the data is synchronized to the destination.)
- Pre-action: After the table data is cleared and before the table is added again:
- Perform the same DDL operations on the destination as those on the source to ensure that the source and destination structures are the same.
- Enable CDC for the table where DDL operations are performed on the source.
- Edit the DRS task to delete the table from the synchronization object, clear the table data in the destination database, and add the table again to the synchronization object.
What is your overall rating for this page?
Thank 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