STOP !!! This blog AWESOME has been updated and can be found here
The following steps I would share with everyone is the result of a request I received from a partner during an event recent training. The disaster recovery purposes partner wanted to know how to join a new controller on a DB site when there are no active controllers to facilitate the process. Faced with this request, I looked into the process and it turned out to be quite simple ...
Environment Details
SQL server = sqlserver.training.lab
XenDesktop DB name = CitrixXenDesktopDB
= dc2.training.lab new controller
Step 1 : Create an instance script for each service being run on the new controller (dc2 .training.lab) and run against the database XD (as usual, the query should be run SQLCMD mode):
XD5
instance Get-BrokerDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: brokerjoin. sql
Get-instance ConfigDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: configjoin.sql
Get-instance HypDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: hostjoin.sql
Get-ProvDBSchema -databasename CitrixXenDesktopDB -ScriptType instance> c: provjoin.sql
Get-instance PvsVmDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: pvsvmjoin.sql
Get-instance AcctDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: adjoin.sql
XD7
Get-instance BrokerDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: brokerjoin.sql
Get-instance ConfigDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: configjoin.sql
Get-instance HypDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: hostjoin.sql
Get-instance ProvDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: provjoin.sql
Get-instance AcctDBSchema -databasename CitrixXenDesktopDB -ScriptType > c: adjoin.sql
Get-instance AdminDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: adminjoin.sql
Get-instance LogDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: logjoin.sql
Get- EnvTestDBSchema -databasename CitrixXenDesktopDB -ScriptType instance> c: envtestjoin.sql
Get-instance MonitorDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: monitorjoin.sql
Get-instance SfDBSchema -databasename CitrixXenDesktopDB -ScriptType> c: sfjoin .sql
Step 2 : Set DB connection string for each new controller services:
XD5
Set -BrokerDBConnection -DBConnection "server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-ConfigDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-HypDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-ProvDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-PvsVmDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-AcctDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
XD7
Set-AdminDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-BrokerDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-ConfigDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-HypDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-ProvDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-AcctDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-EnvTestDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-MonitorDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-SfDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
Set-LogDBConnection -DBConnection" Server = sqlserver.training.lab; Initial Catalog = CitrixXenDesktopDB; Integrated Security = True "
The Notes:
-If using XD7, The Delegated Administration Service (alias = admin) should be the first service that you set the DB connection string for otherwise. all other strings above will fail / Timeout. This is normal.
-Force switch was introduced in XD7.1 and can be used to force chains DBConnection although DBConnection for delegated administration service has not been set. the use of the -force switch allows you to control services in the above script as you want
step 3 Save new controllers service instances with the existing site configuration service:
XD5
Get-BrokerServiceInstance | Sign ConfigServiceInstance
Get- ConfigServiceInstance | Sign ConfigServiceInstance
Get-HypServiceInstance | Sign ConfigServiceInstance
Get-ProvServiceInstance | Sign ConfigServiceInstance
Get-PvsVmServiceInstance | Sign ConfigServiceInstance
Get-AcctServiceInstance | Sign ConfigServiceInstance
XD7
Get-BrokerServiceInstance | Sign ConfigServiceInstance
Get-ConfigServiceInstance | Sign ConfigServiceInstance
Get-HypServiceInstance | Sign ConfigServiceInstance
Get-ProvServiceInstance | Sign ConfigServiceInstance
Get-AcctServiceInstance | Sign ConfigServiceInstance
Get-AdminServiceInstance | Sign ConfigServiceInstance
Get-LogServiceInstance | Sign ConfigServiceInstance
Get-EnvTestServiceInstance | Sign ConfigServiceInstance
Get-MonitorServiceInstance | Sign ConfigServiceInstance
Get-SfServiceInstance | Sign ConfigServiceInstance
If anyone has questions or is having problems following the steps above let me know in the comments section below.
Best regards
Mick Glover (aka Tipster XD)
Senior Specialist preparation, worldwide support [EMEA]
Citrix Systems, Inc.
Follow @xdtipster
0 Komentar