As long as Allow Anonymous Subscribers is set to true on the publication, you can set this property to anything you want. It is normal to set it to a value that allows an administrator to easily identify a given mobile device/user so that when using Replication Monitor or enabling replication logging, you can see who is having trouble and know who that is quickly. So for example, I might set my Subscriber property to "DDSHAFF12345" where DDSHAFF is my mobile login ID that my Windows Mobile app wants to see and 12345 is the OEM ID of my mobile device (which I can get by P/Invoking some native code on the device). But you can feel free to set the value to whatever you want, as long as Allow Anonymous Subscriptions is enabled on the server.
If two subscribers should both attempt to replicate with the same value in this property, they are treated uniquely on the server as SQL Server 2000/2005 appends a unique identifier to the end of the value you provide to avoid conflicts.
One thing to make sure you understand clearly is that if you replicate the very first time and a subscription is successfully created and you then change the value in the Subscriber or HostName properties, you need to reinitialize the subscription during the next replication.
In more secure scenarios, it is common for all subscribers to be defined and granted permissions on the server. In a case like this, you need to use the Subscriber name that the administrator created for you in order for replication to succeed. This is a scenario where Allow Anonymous Subscribers is turned off on the publication and is a more secure, centralized approach to managing merge replication topologies.
-Darren Shaffer
No comments:
Post a Comment