sql-servermerge-replication

How to make SQLServer Web Merge Replication use non-default port?


I'm setting up a web synchronization for SQL Server Merge Replication. My IIS box is in my DMZ, and the SQL Server machine is behind the firewall, so I need to specify a non-default port (not 1433) to get to the publisher and distributor. I've tried setting it up like 192.168.4.5_1234 and similarly 192.168.4.5:1234 where 192.168.4.5 is my firewall IP and 1234 is the port number (well, I'm giving examples anyways).

The one with the colon blows up completely, and I'm fairly certain that's bad form for windows port specification - I just wanted to show I've tried that. The other gives this:

replmerg -Publisher [192.168.4.5_1234] -PublisherDB [MyDB] -Publication [MyPub] -Subscriber [ME] -SubscriberDB [MyPub] -SubscriptionType 2 -SubscriberSecurityMode 1 -Distributor [192.168.4.5_1234]

...

Message: The process could not connect to Distributor '192.168.4.5_1234'. 2017-10-25 21:53:27.892 Category:SQLSERVER Source: 192.168.4.5_1234 Number: 53 Message: Named Pipes Provider: Could not open a connection to SQL Server [53]. 2017-10-25 21:53:27.894 Category:SQLSERVER Source: 192.168.4.5_1234 Number: 53 Message: A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. 2017-10-25 21:53:27.895 Category:SQLSERVER Source: 192.168.4.5_1234 Number: 0 Message: Login timeout expired 2017-10-25 21:53:27.896 Category:SQLSERVER Source: 192.168.4.5_1234 Number: 0 Message: The merge process failed to execute a query because the query timed out. If this failure continues, increase the query timeout for the process. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.

Why its trying to use named pipes is beyond me, TCP/IP is listed above Named Pipes in my client protocols.

I notice in Microsoft's documentation, it doesn't even tell you how to do this... they just say it will "typically" use the default port. Is this even possible? Anyone ever gotten this to work?

https://technet.microsoft.com/en-us/library/ms151255(v=sql.105).aspx


Solution

  • Just use ",":

    192.168.4.5,1234