views:

13

answers:

1
  • there is a time slot table.
  • it exists on two or more computers.

the table maintains the reservation of the time slot for the complete year.

assume that the connection between the servers breaks.

user on site1,

enters data like :-- timeslot(3:8) reserved for(this) where timeslot is the primary key

user on site2

does the same.

problem

the dbms will give no error as, the change at site1 is not recorded/replicated to the site 2

when the connection between the sites is restablished, there will be an error when the merging of sql sever runs AT BOTH ENDS.

how will this error be handled by the sql server AT BOTH SITES? what data of which site will it allow?

+1  A: 

In merge replication you have conflict detection and resolution, which addresses your scenario. You can configure replication to handle this situation based on how you need the conflict to be resolved.

There are a few ways to set up replication to handle this. You may want the problem resolved by indicating that the first user to make the change is the winner. Or, you may want to prioritize the subscriptions. For example, site 2 could have a higher priority and the change at site 2 would win in your scenario. You can also define your own conflict resolution rules through managed code or COM-based code.

Here are a couple of links with more information.
How Merge Replication Detects and Resolves Conflicts
Advanced Merge Replication Conflict Detection and Resolution

bobs