SQL Server 2008R2事务复制-移动SubscriberDB-推送订阅 [英] SQL Server 2008R2 Transactional Replication - Move SubscriberDB - Push Subscription

查看:150
本文介绍了SQL Server 2008R2事务复制-移动SubscriberDB-推送订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQL Server 2008R2事务复制-移动SubscriberDB-推送订阅

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.

到目前为止,我已经尝试停止分发代理,并让所有未复制的命令复制到Server1上的订户数据库.然后备份并将订户数据库还原到Server2.然后,我创建了一个从Server2到现有出版物的新订阅.

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.

这有效,但是只有从此以后创建的事务才被复制到Server2订户数据库.我还要求在分发服务器数据库上建立的所有旧事务都只转到Server1.

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.

是否有复制命令可用于将分发服务器上现有事务的目的地更新为新的subscriber_DB?

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

有1个出版物,其中包含多篇文章.该发布当前仅由Server1上的一个数据库订阅.

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

推荐答案

您的工作太辛苦了.就像您根本没有现有订阅一样,在新服务器上创建订阅.有很多方法可以做到这一点.选择你喜欢的.在您对另一个答案的答复中,我看到快照是行不通的.使用从备份初始化"选项(在这里,备份"是指发布者的备份),我获得了很多成功.订阅者在初始化后同步之后,就完成了.现在,您可以迁移"到新服务器了.

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.

这篇关于SQL Server 2008R2事务复制-移动SubscriberDB-推送订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆