Issue After Renaming SQL Server for CRM 2015 (Standalone Instance)

This morning, I was trying to rename the Computer Name of the VM that I copied from my colleague since the computer name was given with his initials. (so that I was trying to rename it to more generic one)

The VM was installed with SQL Server 2014 and MS CRM 2015 all in one machine.
After I've changed the computer name and restarted, I tried to open the Deployment Manager in order to update the SQL DB connection of my environment and update the server names, the Deployment Manager snap-in loading stopped with the following error.

 Unable to access the MSCRM_CONFIG database. SQL Server does not exist or access denied.  


So, I updated the configdb and ServerUrl registry value under MSCRM registry hive (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM)
After updating the registry key and open the deployment manager, I got the Deployment Manager snap-in crashed with the following error while loading.

 FX:{1ac9de3e-24ae-480d-9e15-65386b76e433}  
 Type is not resolved for member 'Microsoft.Crm.CrmException,Microsoft.Crm.Core, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.  
 Exception type:  
 System.Runtime.Serialization.SerializationException  
 Exceptin stack trace:  
   at Microsoft.ManagementConsole.Internal.IMessageClient.ProcessRequest(Request request)  
   at Microsoft.ManagementConsole.Executive.RequestStatus.BeginRequest(IMessageClient messageClient, RequestInfo requestInfo)  
   at Microsoft.ManagementConsole.Executive.SnapInRequestOperation.ProcessRequest()  
   at Microsoft.ManagementConsole.Executive.Operation.OnThreadTransfer(SimpleOperationCallback callback)  

I referred a couple of blog posts and a forum thread and I tried to run Repair.



At the verification step during the Repair, I got the SQL Server with the error message "The instance name must be the same as computer name.". Since there is no step to update the SQL server instance name during the whole process before the verification step, the Repair process was totally stuck without any option.


I Googled around a bit more and I found a couple of blog posts which suggested to update the MSCRM_CONFIG DB values. So, I updated

  • 4 [NVarCharColumn] values in [DeploymentProperties] table
  • [ConnectionString] ,[SqlServerName] and [SrsUrl] values in [Organization]
  • [FullName] and [Name] values in [Server] table

After all those updates, the CRM environment is working without any Repair required.

 SELECT [ColumnName], [NVarCharColumn]  
 FROM [MSCRM_CONFIG].[dbo].[DeploymentProperties]  
 WHERE [ColumnName] = 'ADDeploymentSdkRootDomain' OR   
      [ColumnName] = 'ADDiscoveryRootDomain' OR   
      [ColumnName] = 'ADSdkRootDomain' OR   
      [ColumnName] = 'ADWebApplicationRootDomain'  


 SELECT [FriendlyName]  
      ,[UniqueName]  
      ,[ConnectionString]  
      ,[SqlServerName]  
      ,[SrsUrl]  
 FROM [MSCRM_CONFIG].[dbo].[Organization]  


 SELECT [FullName] ,[Name]  
 FROM [MSCRM_CONFIG].[dbo].[Server]  

Even though CRM environment is working fine, you may still need to fix the DB connection string in Reporting Services from Reporting Services Configuration Manager.


This blog post also suggested to Fix SQL Server and Restart Services. (a good thing to take note)

  1. In SQL Server Management Studio run the following SQL:
 sp_dropserver <old_name>;  
 GO  
 sp_addserver <new_name>, local;  
 GO  
  1. Restart SQL Server Services.
  2. Run SELECT @@SERVERNAME to confirm the rename has succeeded.
See http://technet.microsoft.com/en-us/library/ms143799.aspx for further details on
renaming instances of SQL Server.

The same blog post suggested to Update CRM Security Group Membership in Active Directory. (it was necessary for my case since my standalone VM consists of the Active Directory service too.
It is also not necessary if you renamed your server whilst it was connected to the Domain Controller (you might want to check though just to be sure).
a. Log onto your Domain Controller as a Domain Admin
b. Open up Active Directory Users and Computers and navigate to the Security Groups created by the original CRM installation process for your server. Eg. PriveReportingGroup, PrivUserGroup, SQLAccessGroup.
c. Open each group and add your new server as a member to each.
NB. You will need to select "Computers" as an Object Type

Comments

Post a Comment

Popular Posts