Sql-server – MS SQL New Publication Wizard – Unable to connect to server ‘Server Name’

database-replicationsql server

I am trying to create a new publication. SQL Standard 2008 windows 2008 r2.

I am logged into the sql server management studio on the server that sql is installed.

I have logged into the sql server using the computer name.

I right click on local publications under the replication folder and select new publication.

It says:

SQL Server is unable to connect to server 'ServerName'

Additional infromation:
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, 'ServerName'. (Replication.Utilities)

I am putting the computer name of the server name I am on but it still doesn't work.
I tried created an alias through the sql configuration.
I put an entry in the hosts file point back to itself.
I tried changing my computer name and sql server name.

Best Answer

If you are using SSMS and specifying anything but what @@servername returns on the server as your connection string, that's your problem. Maybe you've put in a port number, using a DNS alias for the server or anything else like that. RMO (replication management objects, the technology that SSMS is using for the new publication wizard) is silly about the server name.