Friday, March 23, 2012

Merge replication row filter

I have a situation which I can't seem to find an answer to. I have
merge replication set up in SQL2005 and everything seems to work find
except that the row filter for a table isn't working 100%. I have 200
or so field guys who have SQL Express installed on their laptops who
syncronize data back to the server through web syncronization. The
filter in question looks like this:
SELECT <published columns> FROM [dbo].[Stores]
WHERE Division =
(SELECT DivID FROM Divisions
WHERE DistrictDivision = HOST_NAME())
The row filter works fine except when a store is moved from one
division to the next. While it shows up in the new division, it
remains in the old one. I have tested the select statements used in
the filter and they return act as expected. Has anyone seen anything
like this?
Thanks in advance
JC
Hi,
On SQL2005 there is a parameter to sp_addmergepublication called
@.allow_partition_realignment. It sounds like the option you need if
you want to remove a store from the old division. You may need to
consider realigning your current subscribers by forcing a
reinitialisation.
http://msdn2.microsoft.com/en-us/library/ms176103.aspx
Tim
On Mar 31, 6:07 pm, "JC" <jbzcoo...@.gmail.com> wrote:
> I have a situation which I can't seem to find an answer to. I have
> merge replication set up in SQL2005 and everything seems to work find
> except that the row filter for a table isn't working 100%. I have 200
> or so field guys who have SQL Express installed on their laptops who
> syncronize data back to the server through web syncronization. The
> filter in question looks like this:
> SELECT <published columns> FROM [dbo].[Stores]
> WHERE Division =
> (SELECT DivID FROM Divisions
> WHERE DistrictDivision = HOST_NAME())
> The row filter works fine except when a store is moved from one
> division to the next. While it shows up in the new division, it
> remains in the old one. I have tested the select statements used in
> the filter and they return act as expected. Has anyone seen anything
> like this?
> Thanks in advance
> JC

No comments:

Post a Comment