CRM 2011 installation error – SQL Server: The instance name must be the same as computer name

I got this error on a recent CRM Install.

The reason for this error was because the name of the SQL Server machine had been changed after SQL Server 2012 had been installed.

So what I think basically happens when you install CRM it creates the default instance with the same name as the computer – server name.

So I believe the CRM 2011 installation was looking for the service name which is the same name as the server and couldn’t find one.

luckily there is a couple of good blogs written on this

http://community.dynamics.com/product/crm/crmtechnical/b/zhongchenzhoustipstricksandportaldevelopment/archive/2012/04/28/dynamics-crm-2011-installation-error-the-instance-name-must-be-the-same-as-computer-name.aspx

http://mscrmuk.blogspot.co.uk/2008/10/sql-server-instance-name-must-be-same.html

The answer to this problem is to rename the instance name with some SQL commands I never come across before.

Open up an SQL Query window and type

sp_helpserver 

This will give you the name of the current server instance and a bunch of other values (but don’t worry about those)

We now need to drop this name by running the SQL command below, You put the value of the incorrect server name in the quotes  (where I have INCORRECT SERVER NAME”

SP_DROPSERVER “INCORRECT SERVER NAME”

now run the command below and the name in the quotes is the name of the server, don’t forget to add the comma local at the end otherwise the sql statement will error.

SP_ADDSERVER “DATABASE-1”, local

After you have done the change you can run

sp_helpserver 

It should return the changed value.

You now need to run restart SQL Server and try the CRM install verification again