Search code examples
sql-serversql-server-2008-r2replicationtransactional-replicationsubscriber

SQL Server 2008R2 Transactional Replication - Move SubscriberDB - Push Subscription


SQL Server 2008R2 Transactional Replication - Move SubscriberDB - Push Subscription

I have a requirement to move a subscriber database to a new server outside of a system outage i.e. I cannot stop new transaction from loading into the publisher database.

So far I have attempted to stop the distribution agent and let all un-replicated commands replicate to the subscriber database at Server1. Then backup and restore the subscriber database to Server2. I have then created a new subscription from Server2 to the existing publication.

This works but only transactions created from that point forward are replicated to the Server2 subscriber database. I also require all the old transactions built up at the distributor database destined to only go to Server1.

Is there a replication command available to update the destination of existing transactions at the distributer to the new subscriber.subscriber_DB?

There is 1 publication with multiple articles. The publication is currently only subscribed to by one database at Server1.


Solution

  • You're working too hard. Create a subscription on the new server as though you didn't have an existing subscription at all. There are many ways to do this; pick your favorite. I see in your response to another answer that snapshots are a no-go. I have had a lot of success using the "initialize from backup" option (here, "backup" refers to a backup of the publisher). Once the subscriber is in sync after initialization, you're done. You're now clear to "migrate" to the new server.