Filter Row with Merge Replication

  • Hello Friends

    I have created two subscriptions and now i have some requirement with filter row which describe as below.

    1. Sales table with salesman detail.

    2 .Two subscribers 'X' and 'Y' when synchronize data with Publisher, 'X' must get only its own sales data and 'Y' get its own data.

    How can I achieve this requirement with Filter row of merge replication?

    Thanks

  • Hi ya,

    What you need to do is create 2 publications. One for each subscriber.

    Each puplication should have a rowfilter on the Sales table, assuming you have a field that identifies which subscriber these sales records belong to.

    Then use filter joins, if necessary, to filter related tables

    In 2005 the Publication Wizard is much better than is 2000, and makes it easy to create this sort of publication.

    Read this section of the Books on-line

    http://technet.microsoft.com/en-us/library/ms152542.aspx

    Cheers

    Neil

  • Hi Neil

    Thanks again

    Just i have one more question. Is it not possible with only one Publication?

  • Yes, it is possible with one publication but in your filter you will need to identify the subscriber to send it the data you intend, e.g. filter on HOST_NAME or SUSER_SNAME and have some reference between that and the data you want to filter. You could have a table of clients with the HOST_NAME and sales area and use that in your filter.

    For more information see:

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

    where they give an example and more detail.

    Hope this helps.

  • Hi Jeremy

    Thanks for your reply

Viewing 5 posts - 1 through 4 (of 4 total)

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