简体   繁体   English

SQL Server事务复制,更改分发服务器

[英]SQL server transactional replication, change distribution server

I have a SQL 2005 database which is published with dozens of (mostly) transactional publications and dozens of subscribers . 我有一个SQL 2005数据库,其中发布了数十个(大部分)事务性出版物和数十个订阅者。 Currently we have a local distributor. 目前,我们有一个本地分销商。 I'm trying to improve our HA for this setup and am looking at mirroring the published database. 我正在尝试改进此设置的HA,并希望镜像已发布的数据库。 Best practices say to use a remote distributor, in case we have to fail over to the mirror so that replication can continue. 最佳做法是使用远程分发服务器,以防万一我们必须故障转移到镜像以便继续复制。 I've tested that and it works fine. 我已经测试过了,并且效果很好。

But what if the remote distributor fails? 但是,如果远程分配器发生故障怎么办? How do I eliminate that as the single point of failure, or better, how do I recover when it does fail? 我如何将其作为单点故障消除,或者更好,当它确实出现故障时如何恢复?

From testing and what little I could find on the web, I need to completely undo my replication set up (remove subscribers, articles & publications, distributor) and recreate it all with the new remote distributor specified. 通过测试以及在网上几乎找不到的东西,我需要完全撤消复制设置(删除订户,文章和出版物,分发者),并使用指定的新远程分发者重新创建它们。 I'd be fine with that IF I could add my subscribers back without needing to reinitialize them. 如果我可以重新添加我的订户而无需重新初始化它们,我会很好的。 I've successfully used the @subscriptionlsn input of sp_addsubscription for similar situations, where I want to resume replication without resnapshoting & reinitializing them . 我已成功将sp_addsubscription的@subscriptionlsn输入用于类似情况,在这种情况下,我想恢复复制而无需重新快照和重新初始化它们。 But by completely undoing replication, the min_autosynch_lsn is lost as are all the outstanding transactions that go with it. 但是,通过完全撤消复制,min_autosynch_lsn以及随之进行的所有未完成事务都会丢失。

I must be missing something fundamental. 我一定缺少基本的东西。 I know clustering my distributor adds a layer of safety, but even that could fail. 我知道对分发服务器进行群集可以增加一层安全性,但是即使那样也会失败。 So how, or can, I switch to a different distributor without reinitializing my data on them? 那么,如何或可以在不重新初始化我的数据的情况下切换到其他分发者?

There isn't really a good answer. 确实没有一个好的答案。

Other replication technologies like Tungsten Replicator and built in MySQL and PostgresQL replication don't have a need for a central distribution server since both take advantage of reading the binlog on the subscriber. Tungsten Replicator等其他复制技术(内置在MySQL和PostgresQL复制中)不需要中央分发服务器,因为两者都利用了读取订阅服务器上的binlog的优势。

I have found the following from BOL regarding DR for replication topologies. 我从BOL找到了以下有关复制拓扑的DR的信息。

Technet Replication paper Technet复制论文

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM