0

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.

ChickenFur
  • 479
  • 2
  • 5
  • 15

1 Answers1

1

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.

Ben Thul
  • 3,024
  • 17
  • 24
  • Your right, I was using the computer name to try to connect to it. As soon as I changed the sql server name to match the computer name that fixed it. – ChickenFur Jun 08 '11 at 20:54
  • Could you please direct me how can i fix each one of those reasons ? like "PortNumber" or "DNS Alias" ? – Mostafa Jan 30 '12 at 07:16
  • @Mostafa: There's nothing to fix. If you're using anything but what the server thinks it's name is, Management studio simply won't allow you to look at replication stuff. So, check do a "select @@servername" on the server and compare that with what name you used to connect to the server. If they're not the same, just connect with whatever @@servername returned. – Ben Thul Jan 30 '12 at 10:47