question

efuller65 avatar image
efuller65 asked

Merge Replication only working in one direction

I have an environment where this are three servers, each running SQL Server 2012 Standard. I have created a Merge publication on Server #1. Servers #2 and #3 each are subscribers to the Merge publication on Server #1. The subscriptions are configured such that the Merge Agent Location is the subscriber and not the publisher. This environment was working for a few months. I just found that perhaps a few weeks ago, Server #2 is no longer pushing data back to the Publisher (server #1) but is still receiving data from the publisher (server #1). Server #3 continues to work correctly in both directions. What could have happened? What is the best way to fix the replication? And what is the best way to ensure this doesn't happen again?
replicationmerge
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Cyborg avatar image
Cyborg answered
Do you see any errors in replication monitor for subscriber Server#2? In merge agent of Server#2 can you check the following parameter -ExchangeType is not set to 2, the default is 3. If the exchange type is 2, the subscriber will only download the data uploads will not happen. If the above settings are defaults, One way to solve this error is to reinitialize the subscription Server#2 and make sure that you choose "Upload changes First" when it asks, this option will upload all the changes to publisher from server#2 before reinitializing once the data is uploaded to publisher, the subscriber will be reinitialized. To best way to ensure this doesn't happen is to closely monitor the replication and checking the tablediff frequently to find the discrepancy in data among the publisher and subscriber.
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

WilliamD avatar image WilliamD commented ·
Running the agents on the subscriber offloads the work to them instead of the publisher being burdened with running the subscribers too
1 Like 1 ·
efuller65 avatar image efuller65 commented ·
Thank you very much for your answer. One more question, is it better to have the Publisher manage all the subscriptions rather than allowing the subscribers to manage their own? I recall that being an option when I set up the subscriptions and chose to run the Agent on the Subscribers instead of the Publisher.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.