When installing Dynamics CRM on a server you may find you receive an error stating “The instance name must be the same as computer name”. This error refers to the SQL database which contains an invalid name for the server.
This normally only occurs when a machine has been renamed since SQL was installed however I’m sure there are numerous ways to cause this. It can easily be fixed however.
Fixing the Problem
To fix this issue you will need access to the SQL database.
- Open SQL Server Management Studio then connect to the database.
- Select ‘New Query’ in the ribbon.
- (optional) Enter select @@servername and then click Execute to return the currently stored server name.
- Find the current computer name, if not known this can easily be found by accessing File Explorer then right clicking ‘This PC’ in the left-navigation then ‘Properties’ which will show the Computer Name in the window that opens.
- In SQL Server Manager enter SP_DROPSERVER “WrongName” then click Execute. This will drop the reference to the wrong machine name.
- Now enter SP_ADDSERVER “*RightName*”, local which will change the database engine entry for the name of the computer to the correct name.
Once done you should be able to either restart the CRM installer or simply press back then continue and it will re-check the requirements and allow you to progress.
More information on these commands may be found at the following links –
- select @@servername – https://docs.microsoft.com/en-us/sql/t-sql/functions/servername-transact-sql
- sp_dropserver – https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-dropserver-transact-sql
- sp_addserver – https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-addserver-transact-sql