Thursday, May 2, 2013

CRM 2011 - The instance name must be the same as computer name

This is a tricky error message I got a while back which I found a pretty simple solution to. Sometimes when you import an organization, create a new org you'll encounter this issue (or if you're unlucky; during CRM installation):
  • The instance name must be the same as computer name
The reason for this error is that the machine name is configured incorrectly for the CRM instance, and can be remedied by running a few simple queries.

First, check out the computer name for the server running SQL Server (hit win key + pause/break or open computer properties from the control panel), then open SQL Server Management Studio (SSMS) and run the following query:

EXEC sp_helpserver;

If the Windows computer name and the SQL Server instance configured names are mismatched then run the following queries to fix the issue (I take no responsibility for any changes you make to your system).
N.B. If you are running a SQL Server cluster then you really should know what you're doing at this point, do not follow this blog blindly.

EXEC sp_dropserver "Wrong server name here";
EXEC sp_addserver "Correct server name here", local;

Now restart the SQL Server service and the CRM import/creation/repair should complete successfully.