Replication Error “SQL Server is unable to connect to server..”


If you’re working in SQL Server Replication, you may get this message
SQL Server is unable to connect to server ‘Your server name‘.

SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, ‘Another server name‘. (Replication.Utilities)

It always appears as you change the instance name manually or network administrators change the computer name.

Actually your server name still as it’s and not changed with above changes so to avoid getting this message you should write these couple of T-SQL scripts every time you do one or all changes on the instance name

SELECT @@SERVERNAME — you’ll get a strange name, you may didn’t see it before…
GO
sp_dropserver ‘Old server name’ — you got it from pervious select.
GO
sp_addserver ‘SQL server instance name’,’local’ — the name of current instance.
GO
Then, restart the service, and go on you replication work…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: