Foreign key conflicts causing Sync failures

Server id:

Sync server: 5ad087df-3eea-4bfa-b44d-5892e02247ed_East US

Spoke server with error msg: vm0ieob8y6

Region: West US

Time / Date: Every 5 min since 11:35 am AST Feb 26th

Tracing Id: 1500480b-42a1-4d59-b001-bf3526346a4b

Error msg


Data Sync will stop synchronizing changes for this sync group member in 44 days if the failures are not resolved.


Upload - 
errors for first 5 rows that failed to apply:
Error #1: SqlException Error Code: -2146232060 - SqlError Number:547, Message: The INSERT statement conflicted with the FOREIGN KEY constraint "FK__xxx__5E8A0973". The conflict occurred in database "xxx", table "dbo.xxx", column 'ID'. SqlError Number:3621, Message: The statement has been terminated. 

Error #2: SqlException Error Code: -2146232060 - SqlError Number:547, Message: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_xxx". The conflict occurred in database "xxx", table "dbo.xxx", column 'ID'. SqlError Number:3621, Message: The statement has been terminated.

For more information, provide tracing id 1500480b-42a1-4d59-b001-bf3526346a4b to customer support.

February 27th, 2013 5:49pm

I finally had the opportunity to dig into this in more depth.

It turns out that for some reason when Data Sync set up the schema on the spoke database it didn't match.

There was a foreign key constraint defined on the table which in the original database had a NO CHECK constraint and on the spoke database it had a CHECK constraint.  This meant that data could be inserted into the original database while violating the foreign key constraint and yet when that data was synced to the spoke database, the insert failed.

No clue why the schema wasn't the same but thought I'd document it for others who may run into similar difficulties.

Free Windows Admin Tool Kit Click here and download it now
May 31st, 2013 12:34pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics