如何配置XenDesktop使用Mirror数据库

在XenDesktop的部署过程中如果是用SQL Mirror的方式我们建议用户在配置好Mirror之后在初始化XenDesktop站点配置,这样在Connection string中默认会包含mirror数据库连接。但是有时候难免会有用户出现先配置站点以后在配置mirror,这样就会让事情变的非常复杂,需要几十条命令重置所有service的connection string,稍有不慎可能导致环境挂掉。这里我整理了2段简单的脚本供大家使用。

创新互联公司始终坚持【策划先行,效果至上】的经营理念,通过多达十多年累计超上千家客户的网站建设总结了一套系统有效的全网整合营销推广解决方案,现已广泛运用于各行各业的客户,其中包括:成都假山制作等企业,备受客户夸奖。

注意事项

  1. 修改前务必对DDC和DB做快照
  2. 此脚本仅适用于7.15 LTSR, 不同的版本服务数量会有差异,请自行修改

具体步骤

  1. 我们首先需要将DDC中的connection string置空,您可以将一下内容保存为ps1文件到DDC上通过管理员权限执行
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\DesktopServer\DataStore\Connections\Controller ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\ADIdentitySchema\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\Analytics\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\AppLibrarySchema\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\ConfigLoggingSiteSchema\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\ConfigurationSchema\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\DAS\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\DesktopUpdateManagerSchema\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\EnvTestServiceSchema\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\HostingUnitServiceSchema\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\Monitor\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\OrchestrationSchema\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\StorefrontSchema\DataStore\Connections ConnectionString $null
    Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\TrustSchema\DataStore\Connections ConnectionString $null

  2. 重启DDC
  3. DDC上重置connection string, 服务器地址请自行修改,保存ps1文件DDC上通过Powershell执行

Asnp citrix*
$cs="Server=DB.ctx.com;Failover Partner=DB2.ctx.com;Initial Catalog=Citrixsite;Integrated Security=True"
$cslog="Server=DB.ctx.com;Failover Partner=DB2.ctx.com;Initial Catalog=CitrixLogging;Integrated Security=True"
$csmonitor="Server=DB.ctx.com;Failover Partner=DB2.ctx.com;Initial Catalog=CitrixMonitoring;Integrated Security=True"

Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\DesktopServer\DataStore\Connections\Controller ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\ADIdentitySchema\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\Analytics\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\AppLibrarySchema\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\ConfigLoggingSiteSchema\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\ConfigurationSchema\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\DAS\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\DesktopUpdateManagerSchema\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\EnvTestServiceSchema\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\HostingUnitServiceSchema\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\Monitor\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\OrchestrationSchema\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\StorefrontSchema\DataStore\Connections ConnectionString $cs
Set-ItemProperty -Path HKLM:\SOFTWARE\Citrix\XDservices\TrustSchema\DataStore\Connections ConnectionString $cs

Set-MonitorDBConnection -datastore Monitor -DBConnection $null
Set-MonitorDBConnection -datastore Monitor -DBConnection $csmonitor
Set-LogDBConnection -datastore Logging -DBConnection $null
Set-LogDBConnection -datastore Logging -DBConnection $cslog

  1. 重启DDC
  2. 如果DDC多台则需要分别修改

希望对大家有所帮助

当前标题:如何配置XenDesktop使用Mirror数据库
标题来源:https://www.cdcxhl.com/article4/ipeoie.html

成都网站建设公司_创新互联,为您提供微信小程序网页设计公司Google外贸建站定制开发做网站

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

网站建设网站维护公司