SQL Server replication requires the actual server name to make a connection to the server

Symptom:

Error Msg: “SQL Server replication requires the actual server name to make a connection to the server”

 

When attempting to create a new replication publication the following error is produced:

New Publication Wizard

SQL Server is unable to connect to server ‘SSSS’.

Additional information:
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 alternative name are not supported. Specify the actual server name, ‘OOOO’. (Replication.Utilities)

Where “SSSS” is the name of the current server, and (in my case) “OOOO” was the previous name of the same server.

Steps to reproduce this problem:

Microsoft SQL Server Management Studio
Expand the server
Expand Replication
Right click “Local Publications” and select “New Publication …”
Cause:

This error has been observed on a server that had been renamed after the original installation of SQL Server, and where the SQL Server configuration function ‘@@SERVERNAME’ still returned the original name of the server. This can be confirmed by:

select @@SERVERNAME
go

This should return the name of the server. If it does not then follow the procedure below to correct it.

Remedy:

To resolve the problem the server name needs to be updated. Use the following:

sp_addserver ‘real-server-name’, LOCAL

if this gives an error complaining that the name already exists then use the following sequence:

sp_dropserver ‘real-server-name’
go
sp_addserver ‘real-server-name’, LOCAL
go

If instead the error reported is ‘There is already a local server.’ then use the following sequence:

sp_dropserver old-server-name
go
sp_addserver real-server-name, LOCAL
go

Where the “old-server-name” is the name contained in the body of the original error.

Stop and restart SQL Server.

 

 

Reff: http://www.cryer.co.uk/brian/sqlserver/replication_requires_actual_server_name.htm 

Advertisements

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