Step 11 – Configure the Primary and Secondary connection strings in the Data Service config
On both the Primary and Secondary QMS Servers, navigate to the QMS install directory:
C:\Program Files(x86)\Enghouse Quality Management Suite\
Find the DataServiceHost.exe.config file and edit it. Toward the bottom of the file, find the <connectionStrings> tag and in it you will find the following:
<add name="CallRexEntities" providerName="System.Data.EntityClient" connectionString="metadata=res://*/CallRexDataModel.csdl|res://*/CallRexDataModel.ssdl|res://*/CallRexDataModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=localhost\PrimaryInstanceName;Initial Catalog=telrex35;Integrated Security=True;MultipleActiveResultSets=True"" />
<add name="CallRexEntitiesSecondary" providerName="System.Data.EntityClient" connectionString="metadata=res://*/CallRexDataModel.csdl|res://*/CallRexDataModel.ssdl|res://*/CallRexDataModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=localhost\SecondaryInstanceName; Integrated Security=True;MultipleActiveResultSets=True"" />
CallRexEntities should already contain your Primary SQL Database connection Instance name and credentials. You should not have to change this on either server.
CallRexEntitiesSecondary will only have a generic connection string and this will need to be updated on both servers to point to the Secondary SQL Database Instance and given proper credentials.
This sets the Primary and Secondary connection strings for the Database. If for whatever reason, the Primary connection fails, the Data Service will automatically failover to the Secondary connection string. This ensures High Availability. We point both the Primary Data Service and the Secondary Data Service to the Primary SQL Database because we want all data traffic to go to the primary if it is available. The secondary database will only be written to in the case of failure.
When using a SQL Server database with the Always On feature enabled faster reconnection after failover can be achieved by adding MultiSubnetFailover=True to the database connection strings if connecting to an availability group or fail over cluster.
Once the connection strings are correct and updated, restart the QMS Data Service