Fixing Error: “Sql Server replication requires the actual server name to make a connection to the server.”

If you want to setup database mirroring or replication on a server that has a different computer name then it was when SQL Server was installed, you may receive the following error:

"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."

SQL Server Setup sets the server name to the computer name during installation, you can check this name using this query:

SELECT @@SERVERNAME

If the server was renamed after the SQL Server installation, @@SERVERNAME will report the old server name.

To see the current server name use this query:

SELECT SERVERPROPERTY('SERVERNAME')

It will report current Windows server name and instance information.

When the computer name is changed, use sp_addserver to inform the instance of the SQL Server of the new computer name:

sp_dropserver 'old_server_name'
GO
sp_addserver 'current_server_name', 'local'

...and then restart SQL Server for the changes to take effect.

Read related article:
Find out Windows computer name on which the SQL Server instance is running

If the post helped you, please share it:
Pin It

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">