1

I am facing server name problem in SQL Server 2012. When I click on configure distribution I get an error:

Unable to connect to server. Specify the actual server name.

I changed my server name and restarted the services but unable to connect through new server name.

Basically, I am doing this on local domain based server.

Kindly suggest a suitable solutions.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

2 Answers2

1

After you rename a SQL Server machine, you will also need to rename the SQL Server instance itself using:

sp_dropserver <old_name>;  
GO  
sp_addserver <new_name>, local;  
GO  

For more information, see Microsoft's article called Rename a Computer that Hosts a Stand-Alone Instance of SQL Server.

NTDLS
  • 4,757
  • 4
  • 44
  • 70
0

I think what your probably finding is that changing the Windows server hostname doesn't actually change the original SQL Server instance name which still gets used for certain services. Run the following on the DB engine:

SELECT @@SERVERNAME 

You'll probably find a different value to what your expecting from the OS.

There isn't really a solution to this that I'm aware of without re-installing SQL Server on the newly named box.

Also be careful with names that exceed to the 15 character NetBIOS limit.

Paul Andrew
  • 3,233
  • 2
  • 17
  • 37