Wednesday, March 21, 2012

Merge Replication Push using IP address fails? WTF?

I have a Merge publication that has multiple subscribers. They are all SQL Express, so it's all Push Subscriptions.

When I try to add a subscriber by it's IP address, the snapshot gets delivered. Schema created, data loaded, but I see the following error in Replication Monitor:

The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)

Cannot find the object 'MSmerge_ctsv_E0801EECCA824BB29D48D36D64D2BAEA', because it does not exist or you do not have permission. (Source: MSSQLServer, Error number: 15151)

When I change the IP address in the script to the name of the machine it works perfectly. The ONLY thing I changed in the script was the IP address to the name.

The reason for this is that I have several client machines that will have connectivity, but NO name resolution back at the Server.

Please, Please, Please help!

Sample follows:

Code Snippet

execsp_addmergesubscription

@.publication = N'TestPub',

@.subscriber = N'10.126.22.30',

@.subscriber_db = N'dbTest',

@.subscription_type = N'Push',

@.sync_type = N'Automatic',

@.subscriber_type = N'Local',

@.subscription_priority = 0,

@.description =null,

@.use_interactive_resolver = N'False'

execsp_addmergepushsubscription_agent

@.publication = N'TestPub',

@.subscriber = N'10.126.22.30',

@.subscriber_db = N'dbTest',

@.job_login =null, @.job_password =null,

@.subscriber_security_mode = 0,

@.subscriber_login = N'Valid SQL LOGIN',

@.subscriber_password = N'ValidPassword',

@.publisher_security_mode = 1,

@.frequency_type = 64,

@.frequency_interval = 0,

@.frequency_relative_interval = 0,

@.frequency_recurrence_factor = 0,

@.frequency_subday = 0,

@.frequency_subday_interval = 0,

@.active_start_time_of_day = 0,

@.active_end_time_of_day = 235959,

@.active_start_date = 20070607,

@.active_end_date = 99991231,

@.enabled_for_syncmgr = N'False'

Pushing to an IP address is not supported. No doubt that is why it is failing. You must push to the server name. However you can setup an Alias and push to that. I think the Alias must match the server name.

I did read somewhere that Aliases may not be supported either but I know that does work. You could also consider adding entries to your hosts file.

Martin

|||

DOH!

Thanks for the reply.

I really HATE having to edit the hosts file......

No comments:

Post a Comment