您好,登錄后才能下訂單哦!
在XenDesktop的部署過程中如果是用SQL Mirror的方式我們建議用戶在配置好Mirror之后在初始化XenDesktop站點配置,這樣在Connection string中默認會包含mirror數據庫連接。但是有時候難免會有用戶出現先配置站點以后在配置mirror,這樣就會讓事情變的非常復雜,需要幾十條命令重置所有service的connection string,稍有不慎可能導致環境掛掉。這里我整理了2段簡單的腳本供大家使用。
注意事項
具體步驟
我們首先需要將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
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
希望對大家有所幫助
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。