Reliplication Problem for Child table | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Reliplication Problem for Child table

Me and my colleagues were facing a replication problem for a parent-child table combination. Problem is like: Let’s say we have two table. Table1 ID_1 guid
Another table is a child table of table1. The reason we have child tables is
that they are dynamic. Dynamic in the sense of zero to many relationship
to parent table. e.g. If table1 is contact table then table 2 will be table for
phone number where use has a choice to add zero or n numbers of phone
number. Table2
ID_2 guid
ID_1 guid – foreign key While update of record as whole, irrespective of table2 changed or not,
what we do is to update table1 and delete table2 for that id and insert
again; very general practise in such scenario. Doing that what happens is the table2 will have whole new set of id’s.
Now coming to replication. If the same record got updated offline on online
then during merge process what happens is that it ends of doubling of
records in the child tables. As the reason is whole new set of record
created in Table2 table in offline and inline database.
Replication will not have any conflict also. However, from business point of
view it is a logical conflict. I was wondering if you had come across such kind of situation. If so, how
it has been resolved. I would also like to talk about the strategy you have
used for conflict handling.

Have you configured the replication on the database, if so what was the error or information during the process? I think Merge Replication may be suitable in this situation;EN-US;307356 as referred in this KBA. If not come with any other pointers from your side about type of replication used or to be used. Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.