Monday, March 19, 2012

How to configure multiple subscriber to same publisher using filte

Hi,
I have a base table in publisher db. I have a column, using which i want to
filter it and replicate it to certain dbs. how do i dynamically do it ?
Like for eg, consider this table :
ID Project name center
1 A NY
2 B LON
3 C PAR
now, i want to filter using the column "center". if center = 'NY', then i
must direct it to a particular subscriber. if it is "LON" then it must be
directed to someother subscriber. also, i must accomplish this using merge
replication
for my requirement, i am not able to use multiple publishers to accomplish
it. i must use one publisher, with a filter which varies dynamically
depending on the subscriber.
please explain how i can accomplish this.
PS : I'm new to databases. sorry if this question is very basic
Ki,
this question is not at all basic
You can use dynamic filtering in merge replication. Set up the filter as
center = HOST_NAME(). In the merge agent, before initializing, edit the
command-line parameters and add -HOSTNAME NY for the NY subscriber and so on
for the others.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

No comments:

Post a Comment