book
Article ID: CTX217247
calendar_today
Updated On:
Description
Adding Existing XenApp/XenDesktop 7.9 Delivery Controllers into a SQL Always On Setup will fail with error: The replica server <servername> could not be contacted. Check the database status on the SQL server. Ensure database server allows remote connections and the firewall is not blocking connections. (This is specific to Named Instances)
Resolution
We recommend upgrading to XenApp/XenDesktop 7.11 as this issue has been fixed in this release.
The following
Workarounds can be utilized if upgrading to 7.11 is not possible:
NOTE: This issue is currently affecting XA/XD 7.8 and 7.9. If you call into Technical Support Mention LC6010.
- Disable AlwaysOn
- Switch SQL Server(s) from Named Instances to Default Instances
- To avoid performing option number 4 (Shown Below) simply remove your XenApp/XenDesktop Database(s) from the SQL Always On Group. Leave the Database(s) on the primary server and extend your delivery controllers. After you have extended your site, put the Database(s) back in the Always On Availability Group
- Clear out the Database:
- Following this Article: https://support.citrix.com/article/CTX139505/, which explains how to remove the Delivery Controllers Manually. A summary of those steps are below:
- Open Powershell as Administrator
- Import Citrix Modules: asnp Citrix*
- Run Get-BrokerController
- Copy the SID of the Controller
- Run the Scrip provided in CTX139505 on the DDC
- In the script, change the $DBName to your Site Database Name
- In the script, change the $EvictedSID with the DDCs SID
- This script will create a SQL script that will need to be ran against the Datastore
- Navigate to the SQL Server > Select "New Query"
- Under the Query Menu, select SQLCMD

11. Now run the script provided against the Databse to clear the DDC.
Problem Cause
Studio tries to connect to the replica/mirror with just the server name, but needs instance name to be successful. The instance name is being stripped off from the data source and uses the Server Name instead leading to the issue.