Azure data sync not syncing sql database data properly as expected

631 views Asked by At

I was checking Azure data sync functionality for azure sql databases and observed that data was not properly synced.

Scenario: I have created Sync group having one hub machine [Hub1] and 2 databases one within same data center [DB1] and another from other data center [DB2].

Case: I have made modification in one table of DB2 and triggered\ran sync to do database synchronization. After sync, when I check database, I have observed that only Hub1 table data modified as per DB2 but DB1 did not modified.

when I again triggered database sync then only DB1 got modified as per change in DB2.

As per my understanding and expectation, in one sync operation, both Hub1 and DB1 should get modified as per modification in DB2.

Why is this data mismatch issue?

1

There are 1 answers

0
Gary Zhu On BEST ANSWER

Yes, the situation you met is possible. For a 1 hub-2 member sync, it will actually trigger two pair-to-pair sync: [Hub1] <-> [DB1] and [Hub1] <-> [DB2]. But the order which pair will synchronize first is random.

So in your case, mostly the [Hub1] <-> [DB1] is triggered first but find no change updated since data between [Hub1] and [DB1] are the same. And then [Hub1] <-> [DB2] is triggered. So [Hub1] is updated but [DB1] still not changed. But if you change the data on [Hub1], not on member, this issue won't happen.

To resolve your problem, it is suggested to set a scheduled sync or manually sync twice when there are 2 members to ensure the consistency.

Regards, Gary