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



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q252372
BUG #: 56275 (SQLBUG_70)

SYMPTOMS

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.

CAUSE

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.

WORKAROUND

Run the pull merge agent on the subscriber with the same user context as the -PublisherLogin specified in the merge agent.

STATUS

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.

MORE INFORMATION

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 = 1
GO
				
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.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbfix KB252372