简体   繁体   English

SQL 服务器事务复制

[英]SQL Server transactional replication

I have a transaction publication setup on SQL Server 2014 that replicates to SQL Server 2008, then I use merge replication to synchronize to a SQL Server CE database on a Win CE device.我在 SQL Server 2014 上有一个事务发布设置,它复制到 SQL Server 2008,然后我使用合并复制同步到 Z9778840A0100CB30C982876741 服务器上的 Z9778840A0100CB30C98287676741 服务器数据库。 The problem is that changes came from the transaction publication isn't replicating through merge publication into the SQL Server CE database on the Win CE device while if I change anything in the SQL Server 2008 database, it's replicating just fine.问题是来自事务发布的更改没有通过合并发布复制到 Win CE 设备上的 SQL Server CE 数据库中,而如果我更改 SQL Server 2008 数据库中的任何内容,它复制得很好。

I already tried snapshot publication and changing "Action when name is in use" property on the publication.我已经尝试过快照发布并更改发布上的“使用名称时的操作”属性。

Please any help would be appreciated.请任何帮助将不胜感激。

For anyone who will encounter a similar issue here's what worked for me:对于会遇到类似问题的任何人,这对我有用:

  • Run the following on your merge publication database:在合并发布数据库上运行以下命令:
    EXEC sp_changemergearticle 

    @publication = 'MyPublication', 

    @article = 'MyArticle', 

    @property = 'published_in_tran_pub', 

    @value = 'true';

For more info about the problem read this article: https://docs.microsoft.com/en-us/sql/relational-databases/replication/publish/publish-data-and-database-objects?view=sql-server-2017有关该问题的更多信息,请阅读本文: https://docs.microsoft.com/en-us/sql/relational-databases/replication/publish/publish-data-and-database-objects?view=sql-server- 2017

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

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