Question

I have a large database with merge-replication on it that needs to be moved to a different server. There is one publisher, but there are close to 200 subscribers, so I don't want to recreate them all manually.

Is there a way to make this move so that I don't have to recreate the publication and subscribers. I read this link, but I wasn't sure if that's what I'm looking for.

If you need more details, let me know. Thanks!

Was it helpful?

Solution

Hopefully, you can find the original "setup subscriber" script. And piggy back on the msdn article below to "variable up" your existing script.

If not, you could create the scripts manually. Not ideal, but better than 200 manual setups through the GUI.

Here is a link to kinda what I'm suggesting: (the msdn link below).

http://msdn.microsoft.com/en-us/library/ms147302.aspx

-- This script uses sqlcmd scripting variables. They are in the form
-- $(MyVariable). For information about how to use scripting variables  
-- on the command line and in SQL Server Management Studio, see the 
-- "Executing Replication Scripts" section in the topic
-- "Programming Replication Using System Stored Procedures".

So you get 1 subscriber working correctly, then you can command line call the scripts and just pass in the other 199 config values (servername/database name, etc).

I would NEVER rely on manual steps to reproduce replication. You'll never "from memory" get the same result twice. There are just too many options, IMHO, and too many "fat finger" mistakes to be made.

EDIT:

http://msdn.microsoft.com/en-us/library/ms152483.aspx

Maybe that can help.

You're looking for a "is there a way to 'script out' publication setup"? (and then subscriber).

If so, you'll have your pre-sql-cmd starting point. Then sqlcmd up the variables.

And you'll know how to get perfect and exact subscribers in the process.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top