Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 merge replication&horizontal filter

Author  Topic 

ozgunnew
Starting Member

13 Posts

Posted - 2006-09-21 : 05:14:15
I am posting this question again, because i need urgent help...
Hi;
If i define a static horizontal filter, it is applied while moving data from publisher to subscriber.
How can we make filter applied while moving data from subscriber to publisher ?
What happens is the following:
Data which does not meet filter requirement replicated from subscriber to publisher, but it is deleted from subscriber. Is this normal?
Thank you so much...

Rishi Maini SQL2K5 Admin
Yak Posting Veteran

80 Posts

Posted - 2006-09-21 : 05:50:17
Well if the data is being deleted from Subscriber it should also be deleted from Publisher. If replication is unable to apply a change in any of the replica it will undo that change from every replica (backfire and delete).

Can you please tell us what the filter condition you are using ?

Thanks
Rishi Maini
Go to Top of Page

Rishi Maini SQL2K5 Admin
Yak Posting Veteran

80 Posts

Posted - 2006-09-21 : 05:51:01
Also do verify if you are getting any types of conflicts.

Thanks
Rishi Maini
Go to Top of Page

Rishi Maini SQL2K5 Admin
Yak Posting Veteran

80 Posts

Posted - 2006-09-21 : 06:26:39
Huummm.....Interesting....

From the Link:-

http://msdn2.microsoft.com/en-us/library/ms152478.aspx

I see this :- "If an insert at a Subscriber does not belong to the partition, it is not deleted. However, it will not be replicated to other Subscribers."

But I just did a quick check on my system and I see the row added at the Publisher but it gets deleted at the Subscriber if the insert at the Subscriber does not belong to the parition.

"Ozgunnew" I will get back to you on this.





Thanks
Rishi Maini
Go to Top of Page

Rishi Maini SQL2K5 Admin
Yak Posting Veteran

80 Posts

Posted - 2006-09-21 : 07:02:56
This is getting as a "system" (Type 5) delete to the Subscriber:-

Can verify the same from "msmerge_tombstone" table at the Sub DB.

Reason is given as :- "No longer belongs in this partial."


So yes its the Merge Replication internal process that is deleting this row from the Subscriber.


I am not sure if this is normal or not keeping in mind the Filter condition on Subscriber...still if I get time I will cretainly post back with any kind of workaround if its there.

Just an update its happening on both SQL 2005 and SQL 2000 and even the host_name() or the suser_sname() (Dynamic filters) are of no help.

I am not sure if it should be considered as a normal behavior just because of the below given reason:-

From the Link:-

http://msdn2.microsoft.com/en-us/library/ms152478.aspx

I see this :- "If an insert at a Subscriber does not belong to the partition, it is not deleted. However, it will not be replicated to other Subscribers."



Thanks
Rishi Maini
Go to Top of Page

ozgunnew
Starting Member

13 Posts

Posted - 2006-09-21 : 07:47:19
Why filters are not applied at subscribers when replicating data from subscribers to publishers?
Are they applied only in publishers?
Go to Top of Page

Rishi Maini SQL2K5 Admin
Yak Posting Veteran

80 Posts

Posted - 2006-09-21 : 08:39:18
Yes you are right, they are evaluated only at Publisher.

Furthermore I checked with resources at my end and looks like its "By Design". No workaround that I can think of for now.



Thanks
Rishi Maini
Go to Top of Page
   

- Advertisement -