Microsoft Dynamics CRM 2013 setup with SQL Server 2014 High Availability

When Dynamics CRM is setup with SQL Server 2013 High Availability a Listener is required to be used in the connection string.  However when doing a Organization import from for example your Test server CRM will not allow you use a Listener if you attempt to use a Listener Dynamics CRM with throw the following error.

InnerException:

System.Net.Sockets.SocketException (0x80004005): No such host is known

at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)

at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)

at Microsoft.Crm.Setup.Server.Utility.ManagedNetworkUtility.IsHostNameLocal(String hostName)

at Microsoft.Crm.Setup.Server.Utility.ManagedNetworkUtility.AreHostNamesSynonymous(String host1, String host2)

at Microsoft.Crm.Tools.Admin.GrantSrsAccessToConfigDBAction.GrantSrsServiceAccessToLocalConfigDB(Uri reportingUrl)

at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)

Because Microsoft does not provide a way within its UI to update the connection string back to the physical server name the only option seems to be to manually update the Organization table in the MSCRM_Config database directly, which of course is unsupported by Microsoft.  This has been confirmed by Microsoft Support.

 

Below is the official response from Microsoft CRM Support

Thank you for your time over the case today.

As discussed earlier, I can confirm that the issue with importing organization is reproducible, in an environment where CRM is configured with SQL 2012 Always On. To fix this issue, we have to update the Connection String in MSCRM registry hive as well as the Organization table in the MSCRM_Config DB, to change the DataSource Name from Lister to the Primary Replica. Once these changes are done the Organization import works just fine and then they go back and revert the changes.

Following changes are done:

  • Change the Data Source from the SQL Server instance name to the availability group listener name.

The complete connection string should appear similar to the following example, where MSCRMAG is the availability group listener name for the availability group that includes the Microsoft Dynamics CRM configuration database:

Data Source MSCRMAG;Initial Catalog= MSCRM_CONFIG;Integrated Security=SSPI

  • Update query for MSCRM_Config DB

Update Organization

set ConnectionString = ‘Provider=SQLOLEDB;Data Source=AG_Listener_Name,Port_Number;Initial Catalog=OrganizationName_MSCRM;Integrated Security=SSPI;multisubnetfailover=true’ where DatabaseName = ‘OrganizationName_MSCRM’

I have discussed this with our senior resources at Microsoft, and we can confirm that this is a workaround for now and the same is supported. The deployment will continue to stay supported until and unless there are no other changes made to the database, then the ones mentioned above.

 

 

Advertisements