SQL Server Merge Replication – Change Partition Definition

merge-replicationsql server

I am using Merge Replication on a few SQL Server 2008 R2 servers. There is one server, and the rest are clients.

I have each of the clients on a different partition using row filters with the HOST_NAME() function.

This works as expected, but I can't seem to figure out how to change this value after creating the subscription.

I need to change this value for all of the subscriptions and I would like to avoid dropping and recreating them.

How can I change the HOST_NAME() value for a subscriber without dropping/recreating?

Best Answer

I found a solution!

  1. Go to the merge agent that handles the subscriber that you would like to change.
  2. Right click -> Properties
  3. Go to the Steps page and edit the Run agent step
  4. Add or Alter the HostName parameter like so: -HostName [<Your Value Here>]
  5. Stop & Start the agent job
  6. Reinitialize the subscription.

That should do it!