更新订阅者上筛选的复制行失败
我有一个包含 1 个分发者/发布者和许多订阅者的合并复制场景。 只有少数文章未经过滤,其他所有文章均由 HOST_NAME() 过滤,从而创建不同(不重叠)的分区。 我也尝试通过 SUSER_NAME() 进行过滤,但无济于事。
过滤和分发工作完美,但订阅者的更新失败并显示以下错误消息:
无法更新文章“%s”中的列。 文章的值为 2 或 3(非重叠分区) 对于partition_options属性,涉及到列 在行过滤器和/或连接过滤器中。在这种情况下,该列不能 在订阅者或再发布者处更新;必须在顶级发布者处更新
它失败的文章的partition_options 设置为“非重叠,单一订阅”。 我尝试执行的 SQL 是一些 nvarchar 和位的简单参数化 UPDATE。
有人知道我缺少什么吗?不可能太远...
编辑: SQL Server 2008 R2 顺便说一句。
I have a merge replication scenario with 1 distributor/publisher and many subscribers.
There are only a few articles which are unfiltered everything else is filtered by HOST_NAME() and thus creating distinct (nonoverlapping) partitions.
I also tried filtering via SUSER_NAME() to no avail.
Filtering and distribution work perfect but updating on the subscriber fails with this error message:
Cannot update the column in article '%s'.
The article has a value of 2 or 3 (nonoverlapping partitions)
for the partition_options property, and the column is involved
in a row filter and/or a join filter. In this situation, the column cannot be
updated at a Subscriber or republisher; it must be updated at the top-level Publisher
The article it fails on has a partition_options-setting of "Nonoverlapping, single subscription".
The SQL I tried to execute is a simple parameterized UPDATE of a few nvarchars and bits.
Anybody any Idea what I'm missing? It can't be far...
EDIT:
SQL Server 2008 R2 btw.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了。
问题是我尝试执行的更新(在本例中是实体框架)还包括我在过滤器表达式中使用的列,因此此更新将更改此数据集的分区,这显然是不允许的。
I found it.
The Problem was that the update I tried to do (well Entity Framework in this case) was also including the column I used in the filter expression, so this update would change the partition of this dataset which is apparently not allowed.