Filtering replication by username

I have a merge replication setup between a central server and 200 clients. The vast majority of customers do not need all 5000 customer records. Only 50 or so that are assigned to them. How can I apply a filter based on who is logged in?

Should I create a NEW DB that maps usernames to customer records and follows this path?

Any better ideas or pitfalls? How does everyone handle this filtering per user ?

Thank!

0


source to share


2 answers


To do this, use either HOST_NAME()

or SUSER_SNAME()

to filter by hostname or current user respectively.

Use the following when building a filter statement in Publishing Properties .



i.e. salesrep = SUSER_SNAME()

See the SQL docs for details .

0


source


I know MS Dynamics CRM uses a server view with a huge selection to see who has permission to see what. When someone requests this view, they only return what they can see.



Perhaps you could do something like this.

0


source







All Articles