How to alter filter row at a replication without reinitialize it?

  • Hello All

    this is my scenario

    Sql server 2008 r2 CU 11

    1 merge replication from 10 different sources ( result database of about 1tb )

    when that was created some filters where added to the articles as to have data only after certain date, but that is static and I need that bar to move as time passes by

    a) I have two options: delete the old data manually from the result db with the associated dangers

    b) recreate the replicated db every time I want to change the filter

    c) follow this suggestion; http://technet.microsoft.com/en-us/library/ms147287%28v=sql.105%29.aspx

    for c), I think that will force me to reinitialize the subscription and that is what I really want to avoid

    I am also looking at how to alter the replication tables manually and then delete the old data, but I am still not sure about it

    I am open to suggestions

    Thanks!!

  • Merge replication supports dynamic filters so in theory you can create a filter using DATEADD to calculate the rows at the subscriber.

    Providing you clean up the subscriber rows manually you "should" be able to drop the existing table/filter out of the publications and re-add it without needing to reinitialise. I've done this many times in transactional replication but the theory should be the same. I suggest you test it though.

    To add the article to the publication without triggering a snapshot requirement use sp_addsubscription @sync_type = 'none' . It will be published and deliver new changes but will assume you've manually setup the data on the subscriber.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply