简体   繁体   English

从SQL Server Express合并复制问题到Server 2008 R2

[英]Merge Replication Issue from SQL Server Express to Server 2008 R2

Since it's not possible to make the server express a Distributor nor a Publisher, I made it as a Subscriber and trying to implement a merge replication with another Database from a 2008 R2 Server. 由于不可能使服务器表示分发服务器或发布服务器,因此我将其设置为订阅服务器,并尝试与2008 R2服务器中的另一个数据库实现合并复制。 It works all fine; 一切正常。 however, the table set on the 2008 R2 server is empty (it's meant to be like that as part of our design in work) and when the replication service starts, the data on the subscriber database (the non-empty one) is deleted initially. 但是,在2008 R2服务器上设置的表为空(这意味着它是我们工作中的设计的一部分),并且当复制服务启动时,订阅服务器数据库(非空数据库)上的数据最初被删除。 。 Does anyone know why this happens? 有谁知道为什么会这样吗? Am I missing something here? 我在这里想念什么吗? I am still rather new in this topic and I would appreciate any help or advice. 我在这个话题上还很陌生,我将不胜感激。

Thank you in advance. 先感谢您。

By default, Merge Replication starts with a snapshot of the publication database and uses this to initialize subscribers. 默认情况下,合并复制从发布数据库的快照开始,并使用它来初始化订阅服务器。 Afterwards, changes are incrementally tracked and replicated. 之后,将增量地跟踪和复制更改。 The problem you are facing is that your publication database contains no data. 您面临的问题是您的发布数据库不包含任何数据。 You then use an empty snapshot to initialize your subscriber. 然后,您使用一个空快照来初始化您的订户。 And since by default article property Action if name is in use is set to Drop existing object and create a new one , you end up with no data at the subscriber. 并且由于默认情况下文章属性“如果使用名称进行操作”设置为“ 丢弃现有对象并创建一个新对象” ,那么最终在订阅服务器上将没有任何数据。

What you need to do is backup and restore the database from the Express instance and restore it to the Standard instance. 您需要做的是从Express实例备份和还原数据库,然后将其还原到Standard实例。 Then create your publication and subscription, generate a snapshot, and initialize your subscriber. 然后创建您的发布和订阅,生成快照,并初始化您的订阅者。

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

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