在合并复制中删除已过滤的文章 [英] Removing a filtered article in merge replication

查看:72
本文介绍了在合并复制中删除已过滤的文章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个合并代表设置,它包括过滤表的层次结构。

在层次结构的顶部有一个参数化过滤器(用户登录)和联接过滤器在其下方启动。


我想从合并复制中删除一个过滤的文章 - 我们不再希望复制该数据。


我从文档中了解到以下内容 -


"删除文章,文章是父文章联接筛选器或逻辑记录(这具有删除联接的副作用)

- 需要:新快照和重新初始化订阅。


所以我一直希望我可以删除位于过滤器层次结构底部的文章而不是任何其他文章的父文章,并且能够在不重新初始化的情况下这样做。


我已经完成了一些测试,我可以放弃这篇文章,这样就行了。它似乎也会掉落过滤器。


我可以运行快照代理并与订阅者同步 - 该文章似乎从发布者和订阅者的出版物中消失。 


到目前为止一切都很好。 


但如果我在顶层应用更新将数据从一个分区移动到另一个分区,则会出现问题。


该更新抛出了与我删除的文章的父文章有关的错误。


错误 是:$
程序MSmerge_expand_sp_EC91C74F42DD4B7C98FF40E8E42136F3,第736行[批处理开始第5行]

找不到存储过程'dbo.MSmerge_expand_sp_DE3788A836DF4BB8B025333DB7F6B9E2'。


似乎父文章仍然试图枚举关于删除的子文章的更改


如果我查询sysmergepartitioninfo,它会在元数据中显示缺少的过程名称,但SP不会存在于数据库中 - 它似乎被删除子文章后运行的静态快照作业删除。  


这是一个错误还是我的理解不完整(是的,后者已经是真的!)。


我可以通过在进行更改时设置force_reinitilise来解决这个问题,但考虑到订阅者的数量,分区的大小以及分区的大小,这对我来说不是一个选择。对业务产生的影响。


我已经尝试在删除文章之前明确删除过滤器,但这只需要重新加入。


任何人都可以澄清是否可以在没有重新初始化的情况下删除过滤器层次结构中的最低文章?



谢谢!


解决方案

Hi
backtothefuture


 


我想你已经阅读过这份文件:
更改出版物和文章属性


 


从文档中我们可以看到副标题:
合并复制的发布属性
合并复制的文章属性


 


删除连接过滤器或逻辑记录。 - >要求:
新快照。 重新初始化订阅。


 


删除一篇文章,其中文章在出版物中有最后一个参数化过滤器。 - >要求:
新快照。 重新初始化订阅。


 


添加,删除或更改行过滤器。 - >要求:
新快照。 重新初始化订阅。


 


最好的问候,


艾米丽


Hi all,
I have a merge rep setup, and it includes hierarchy of filtered tables.
At the top of the hierarchy there is a parameterised filter (user login) and join filters kick in beneath that.

I want to remove one of the filtered articles from merge replication - we no longer wish to replicate that data.

I'm aware of the following from the documentation -

"Drop an article, where the article is a parent in a join filter or logical record (this has the side effect of dropping the join)
- requires: new snapshot and reinitialise subscriptions."

So I have been hoping that I could drop an article which is at the bottom of the filter hierarchy and not a parent of any other article, and be able to do so without reinitialisation.

I have done some testing and I can drop the article, and that works. It appears to drop the filter too.
I can run the snapshot agent and sync with the subscribers - that article appears to disappear from the publication at publisher and subscribers. 

All good so far. 

But a problem arises if I apply an update at the top level that moves the data from one partition to another.
That update throws an error relating to the parent article of the article I dropped.

The error  is :
Procedure MSmerge_expand_sp_EC91C74F42DD4B7C98FF40E8E42136F3, Line 736 [Batch Start Line 5]
Could not find stored procedure 'dbo.MSmerge_expand_sp_DE3788A836DF4BB8B025333DB7F6B9E2'.

It seems the parent article still tried to enumerate the change with respect to the dropped child article

If I query sysmergepartitioninfo it shows the missing procedure name in the metadata, but the SP doesn't exist in the DB - it appears it is removed by the static snapshot job which I run after dropping the child article.  

Is this a bug or is my understanding incomplete (well yes, the latter is already true!).

I could possibly work around this by setting force_reinitilise whilst making the change, but that's not an option for me, given the number of subscribers, the size of the partitions and the impact that would have on the business.

I have tried explicitly dropping the filter before removing the article but that simply demands reintialisation.

Can anyone clarify whether it is possible to drop the lowest article in a filter hierarchy without reinitialisation ?

Thank you!

解决方案

Hi backtothefuture,

 

I think you have already read the document: Change Publication and Article Properties.

 

From the document, we can see from the subtitle: Publication Properties for Merge Replication, Article Properties for Merge Replication.

 

Drop a join filter or logical record. --> Require: New snapshot. Reinitialize subscriptions.

 

Drop an article, where the article has the last parameterized filter in the publication. -->Require: New snapshot. Reinitialize subscriptions.

 

Add, drop, or change a row filter. -->Require: New snapshot. Reinitialize subscriptions.

 

Best Regards,

Emily


这篇关于在合并复制中删除已过滤的文章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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