This article describes how to perform the following tasks:
Configure a XenDesktop site with a mirrored SQL Server database.
Join a XenDesktop controller to an existing site that is configured to use a mirrored SQL server database.
Remove a XenDesktop controller from an existing site that is configured to use a mirrored SQL server database.
Note: Configuring mirroring on a database for a deployed XenDesktop site requires the execution of PowerShell and database scripts. This is outside the scope of this article.
Refer to eDoc link for information on configuring XenDesktop 7.x.
To configure a XenDesktop site for use with a mirrored SQL Server database, complete the following steps:
Create an empty database on the principal with the "Latin1_General_100_CI_AS_KS" collation sequence.
Note: If you plan to change the location of your secondary databases (Configuration Logging and Monitoring databases), you can create two more empty databases as above.
Configure the mirror and notice that it starts mirroring. For more information, see How to: Prepare a Mirror Database for Mirroring (Transact-SQL)
Deploy Desktop Studio using Advanced Deployment in one of the following ways:
Create the database automatically; mirroring is detected without user intervention.
Create the database manually; two scripts are generated: one to be executed on the principal and one to be executed on the mirror. If you are executing the scripts using SQL Server Management Studio, enable the SQLCMD mode before executing the scripts. After executing the scripts, test the database connection by clicking Test connection and continue through the remainder of the wizard.
To verify mirroring after the wizard has completed, run the PowerShell cmdlet get-configdbconnection and ensure that the Failover Partner is set in the connection string to the mirror.
Note: If you created separate database locations for the Secondary databases, you can follow the instructions at http://docs.citrix.com/en-us/xenapp-and-xendesktop/7-5/cds-install-config-intro/cds-change-db-location.html to change the location of Configuration Logging and Monitoring database. At this point the main database along with the secondary databases are in the same location.
Consideration for configuring Mirrored Database on SQL 2016 servers:
If the mirroring is configured using SQL Server 2016, we would not get correct values under ExtraInfo while running Test-DBconnection unless we provide sysadmin server role to DDC machine accounts on SQL server. This is a known limitation observed due to changes in permission models of SQL form 2016 on wards and is not required on SQL 2008 R2 setups. Public role works correctly in testing the access to Mirror Server on 2008 R2 Servers.
Connection for Mirror Server is shown as Failed under ExtraInfo, when tests on DBConnection strings are run:
Database.Server.0.Name <Principal Server Name>,Port
Database.Server.0.ConnectionResult Success
Database.Server.1.Name <Mirror Server Name>
Database.Server.1.ConnectionResult Fail
Post providing sysadmin role to controller account on SQL, the information would look like:
Database.Server.0.Name <Principal Server Name>,Port
Database.Server.0.ConnectionResult Success
Database.Server.1.Name <Mirror Server Name>
Database.Server.1.ConnectionResult Success
To join a XenDesktop controller to an existing site that is configured to use a mirrored SQL server database, run the Join Existing Site wizard in one of the following ways:
Update the database automatically; mirroring is detected without user intervention.
Update the database manually; two scripts are generated: one to be executed on the principal and one to be executed on the mirror. If you are executing the scripts using SQL Server Management Studio, enable the SQLCMD mode before executing the scripts.
To verify mirroring after the wizard has completed, run the PowerShell cmdlet get-configdbconnection and ensure that the Failover Partner has been set in the connection string to the mirror.
To remove a XenDesktop controller from an existing site that is configured to use a mirrored SQL server database, run the Remove Controller wizard in one of the following ways:
Update the database automatically; mirroring is detected without user intervention.
Update the database manually; two scripts are generated: one to be executed on the principal and one to be executed on the mirror. If you are executing the scripts using SQL Server Management Studio, enable the SQLCMD mode before executing the scripts.