Foreign key conflicts causing Sync failures


server id:

sync server: 5ad087df-3eea-4bfa-b44d-5892e02247ed_east us

spoke server error msg: vm0ieob8y6

region: west us

time / date: every 5 min since 11:35 ast feb 26th

tracing id: ‘1500480b-42a1-4d59-b001-bf3526346a4b’

error msg


data sync stop synchronizing changes sync group member in 44 days if failures not resolved.


upload - 
errors first 5 rows failed apply:
error #1: sqlexception error code: -2146232060 - sqlerror number:547, message: insert statement conflicted foreign key constraint "fk__xxx__5e8a0973". conflict occurred in database "xxx", table "dbo.xxx", column 'id'. sqlerror number:3621, message: statement has been terminated. 

error #2: sqlexception error code: -2146232060 - sqlerror number:547, message: insert statement conflicted foreign key constraint "fk_xxx". conflict occurred in database "xxx", table "dbo.xxx", column 'id'. sqlerror number:3621, message: statement has been terminated.

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

i had opportunity dig in more depth.

it turns out reason when data sync set schema on spoke database didn't match.

there foreign key constraint defined on table in original database had no check constraint , on spoke database had check constraint.  this meant data inserted original database while violating foreign key constraint , yet when data synced spoke database, insert failed.

no clue why schema wasn't same thought i'd document others may run similar difficulties.



Microsoft Azure  >  Azure SQL Database



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........