标签:blog 问题解决 strong 生成 dmi com logging 分享图片 数据库服务
首先,还是老规矩沐浴更衣,接到的错误是个关于数据库的,看似稳如老狗,实则慌得一笔,不废话了,直接进入主题。select SID from sys.database_principals where name = ‘[Domain]\[Server]$’
drop user ‘[Domain]\[Server]$’
自此,以为万事大吉,检查平台,发现Controller有2个相同计算机名的ddc,而且删除不了,懵逼中。
好吧,不能愉快的玩耍了,继续干活!
故障描述
平台中存在2个计算机名相同的控制器而且无法删除
故障分析
数据库中存在的记录没有删除
故障解决
asnp Citrix*
$DBName = "XenDesktopDatabase"
$EvictedSID = "DCSID"Generate Database ‘Evict‘ Scripts for XenDesktop DataStore
Get-ConfigServiceStatus
Get-LogSite
Get-BrokerController -Filter {(SID -eq $EvictedSID)} -MaxRecordCount 2147483647
Add-Content "$PWD\evict_$sid.txt" (Get-AcctDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-HypDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-ProvDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-BrokerDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -SID $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-MonitorDBSchema -DatabaseName $DBName -DataStore ‘Site‘ -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-SfDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-EnvTestDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-ConfigDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-LogDBSchema -DatabaseName $DBName -DataStore ‘Site‘ -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-AdminDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-AnalyticsDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-AppLibDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-TrustDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Add-Content "$PWD\evict_$sid.txt" (Get-OrchDBSchema -DatabaseName $DBName -ScriptType ‘Evict‘ -Sid $EvictedSID)
Script completed successfully
Generate Database ‘Evict‘ Scripts for ‘Logging‘ DataStore
Get-ConfigServiceStatus
Get-LogSite
Get-BrokerController -Filter {(SID -eq $EvictedSID)} -MaxRecordCount 2147483647
Add-Content "$PWD\evict_$sid.txt" (Get-LogDBSchema -DatabaseName $DBName -DataStore ‘Logging‘ -ScriptType ‘Evict‘ -Sid $EvictedSID)
Script completed successfully
Generate Database ‘Evict‘ Scripts for ‘Monitor‘ DataStore
Get-ConfigServiceStatus
Get-LogSite
Get-BrokerController -Filter {(SID -eq $EvictedSID)} -MaxRecordCount 2147483647
Add-Content "$PWD\evict_$sid.txt" (Get-MonitorDBSchema -DatabaseName $DBName -DataStore ‘Monitor‘ -ScriptType ‘Evict‘ -Sid $EvictedSID)
Script completed successfully
运行脚本之后,在当前用户的文档会生成evict.txt 文件。
参考文档
https://support.citrix.com/article/CTX201990
https://support.citrix.com/article/CTX139505
标签:blog 问题解决 strong 生成 dmi com logging 分享图片 数据库服务
原文地址:http://blog.51cto.com/9980355/2163587