Migrating the Citrix XenDesktop database 5

In this document we will see how to migrate the Citrix XenDesktop DB 5 to another database server, sometimes it is necessary since we may start our implementation or pilot of XenDesktop with the database in the broker itself (on-premises with SQL Express) and we want to take it to the corresponding DB server,

From PowerShell on each XenDesktop Controller we have we have to disconnect from the database by running:

asnp Citrix.*
Set-ConfigDBConnection -DBConnection $null
Set-AcctDBConnection -DBConnection $null
Set-HypDBConnection -DBConnection $null
Set-ProvDBConnection -DBConnection $null
Set-PvsVmDBConnection -DBConnection $null
Set-BrokerDBConnection -DBConnection $null

Later we will make a backup of the Citrix XenDesktop database 5 using the SQL Management Console or running from DOS: sqlcmd -S SERVIDOR_BD_ORIGENINSTANCIA -q “Backup Database CitrixXenDesktopDB to disk = “PATHBACKUP. BAK”

And we restore it to the new database server,

XenDesktop 5 Use each broker's machine accounts to access the database, so we must create the computer accounts of each Controller in SQL,

In addition, we will assign you the XenDesktop database with the following functions in it:

ADIdentitySchema_ROLE
chr_Broker
chr_Controller
ConfigurationSchema_ROLE
DesktopUpdateManagerSchema_ROLE
HostingUnitServiceSchema_ROLE
MachinePersonalitySchema_ROLE

And finally we will be able to restore the connectivity of the Controllers to the new DB with:

Set-ConfigDBConnection -DBConnection “Server=SERVIDOR_BD_DESTINOINSTANCIA;Database=BASE_DE_DATOS;Trusted_Connection=True”
Set-AcctDBConnection -DBConnection “Server=SERVIDOR_BD_DESTINOINSTANCIA;Database=BASE_DE_DATOS;Trusted_Connection=True”
Set-HypDBConnection -DBConnection “Server=SERVIDOR_BD_DESTINOINSTANCIA;Database=BASE_DE_DATOS;Trusted_Connection=True”
Set-ProvDBConnection -DBConnection “Server=SERVIDOR_BD_DESTINOINSTANCIA;Database=BASE_DE_DATOS;Trusted_Connection=True”
Set-PvsVmDBConnection -DBConnection “Server=SERVIDOR_BD_DESTINOINSTANCIA;Database=BASE_DE_DATOS;Trusted_Connection=True”
Set-BrokerDBConnection -DBConnection “Server=SERVIDOR_BD_DESTINOINSTANCIA; Database=BASE_DE_DATOS;Trusted_Connection=True”


Recommended Posts

Author

nheobug@bujarra.com
Autor del blog Bujarra.com Cualquier necesidad que tengas, Do not hesitate to contact me, I will try to help you whenever I can, Sharing is living ;) . Enjoy documents!!!