FIX: Join Filters with Dynamic Filters May Lead to Non-convergence Problem

This article was previously published under Q252372
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 56275 (SQLBUG_70)
If pull merge replication is set up using join filters in conjunction with login based dynamic filters as an intersection within the filter clause, the data on the publisher and subscriber may become unsynchronized.
The problem is that if the join filter uses the SUSER_SNAME function and if the merge task is using different logins for connecting to the Publisher and Subscriber, the merge agent does not expand the set of rows to be removed which then causes the non-convergence problem.
Run the pull merge agent on the subscriber with the same user context as the -PublisherLogin specified in the merge agent.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.
In order to produce a result that is an intersection of a join filter and a dynamic filter, the merge article is set up with dynamic filters specified in the join filter clause. For example:
exec sp_addmergefilter @publication = N'PUB', @article = N't1',   @filtername = N't1_t2', @join_articlename = N't2',   @join_filterclause = N't1.ID = t2.ID and 't1.usertid = SUSER_SNAME()',   @join_unique_key = 1GO				
With the preceding merge filter set up, if the PublisherLogin account is different from the user context under which the pull merge agent is running, when rows are deleted from table t2, the rows in table t1 that are connected to table t2 by join filter t1.ID=t2.ID are not removed.
join dynamic filters merge intersection convergence user synchronization

Article ID: 252372 - Last Review: 10/20/2013 17:04:26 - Revision: 2.1

Microsoft SQL Server 7.0 Standard Edition

  • kbnosurvey kbarchive kbbug kbfix KB252372