Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Removing a filtered article in merge replication

$
0
0

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!


Viewing all articles
Browse latest Browse all 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>