I'm looking for advice on how to achieve a bi-directional replication which only replicates specific rows in SQL Server 2008.
For example, I would like to replicate Table A between two databases (Europe & Asia). I would like the table to contain both local and shared data. This would be indicated using a field, "region" with values of
- Global
- Europe
- Asia
I've set up a merge replication with Europe being the publisher and Asia the subscriber and a filter of
WHERE region = 1
in an attempt to only replicate rows with region = 1
Adding global rows to Europe or Asia DBs works great with the rows appearing in the opposite table.
Adding Europe rows to the Europe DB works great by not replicating to the Asia DB (as desired)
Adding Asia rows to the Asia DB however doesn't do what I want as the row is replicated to the Europe DB and removed from the Asia DB.
I understand why this would be the case with the publisher / subscriber relationship, but it's frustrating.
I then thought peer to peer might be the solution but I can't filter peer to peer.
Is there a way to achieve what I'm looking for?
Thanks everyone