Sql-server – SQL Server replication over internet error

replicationsql server

I have 2 SQL Servers connected over internet, I can connect (with no problem) from each one to other using SQL Server Management Studio by using publicIP,1433\server as server address.

So, I created a publication on server1 called PUB1 but if I try to create a subscription (from server1) to server 2, I get this error message

TITLE: Connect to Server

Can not connect to MyPublicIP,1433 .

ADDITIONAL INFORMATION :

SQL Server replication requires the real name of the server to establish a connection. Connections via alias, IP address or other reference are not supported. Enter the real name of the server, " SERVEUR\SERVER ". ( Replication.Utilities )

Best Answer

So, I resolved the problem by creating an alias whith the (expected) name: SERVEUR\SERVER, protocol: TCP/IP, port: 1433, server: MyPublicIP\SERVER

sql replication over internet is working very well.