The problem is that you're generating records in an IDENTITY
field in multiple sources, then unable to combine them without those records being assigned new IDENTITY
values.
By using a GUID
as your key field, each of the 3 databases can create records which will have a unique ID, and you'll be able to then combine them without issue. You can still have a UNIQUE
constraint on the field, but the likelihood of generating the same GUID is astronomically small.
Most replication processes utilize this GUID approach at some level already, so it's a common solution to this problem.