Merge Replicate and Mirrors I am preparing some scripts to setup merge replication in our production environment.
After completing the export from UAT, I've come across something that doesn't appear like it would work in the production environment?

exec sp_addmergesubscription
    @publication = N'&lt;snip/&gt;',
    @subscriber = N'&lt;Server Name&gt;',
    @subscriber_db = N'&lt;snip/&gt;',
    @subscription_type = N'pull',
    @subscriber_type = N'local',
    @subscription_priority = 0,
    @sync_type = N'Automatic'


The problem I have with this is that the subscriber name is hardcoded to the physical server name of the subscriber DB.  In UAT that's fine because the subscriber is a single server, in production that's a problem because there are three production subscribers with mirror partners.

What name should I be using for the subscriber?  If I leave it as NULL as the documentation indicates I can, what are the implications of that?
The only answer here, unfortunately is that mirroring is only supported for the pulbisher and only if the distributor is on a different server from with the principal or mirror. I would recommend a dedicated server for the distributor, but even using the subscriber server would work.

Database mirroring is not supported for distributors or for subscribers, and the work-around for mirroring a subscriber as detailed in the whitepaper by SQLCat only works for transactional replication. You could still use the manual sync option if you want to try to do something similar, but you'd have to get the data in perfect sync yourself which is very difficult to do unless you stop traffic to the publisher.