Sunday, March 11, 2012

Dynamic Filtering

I want to dynamically filter my published data to many subscribers based
on a number contained within the server name of the subscriber. ie one
subscriber server is called 8364-Server and I want to use the 8364 as
the "club code" to extract the subset from the publisher. I preferably
want to use push subscriptions.
Using host_name just seems to return the name of the publisher which is
no good. Is my only option to use a look-up table on the publisher to
map usernames of all the subscribers to club codes?
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
use a pull subscription to get the hostname parameter to resolve to the name
of the subscriber.
If you are using merge replication you can use the HostName parameter on you
merge agent commands for this.
You would have to use left(host_name(), 4) for this to work in your filter
in the pull subscription.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Martin Bancroft" <martin.bancroft@.galagroup.co.uk> wrote in message
news:egYD3AIeEHA.2520@.TK2MSFTNGP12.phx.gbl...
> I want to dynamically filter my published data to many subscribers based
> on a number contained within the server name of the subscriber. ie one
> subscriber server is called 8364-Server and I want to use the 8364 as
> the "club code" to extract the subset from the publisher. I preferably
> want to use push subscriptions.
> Using host_name just seems to return the name of the publisher which is
> no good. Is my only option to use a look-up table on the publisher to
> map usernames of all the subscribers to club codes?
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

No comments:

Post a Comment