Failure occurs when trying to add a controller to an existing site.
Error Id: XDDS:1E9F32BB
Exception: Citrix.Console.Models.Exceptions.ScriptException Failed to update database “databasename” on server “Domain\Server”. at Citrix.Console.PowerShellSdk.DatabaseService.Scripts.UpdateDatabaseScript.DoImpersonatedWork() at Citrix.Console.PowerShellInteraction.ThreadedDatabaseScript`1.RunScript() at Citrix.Console.PowerShellInteraction.PowerShellScript`1.Run() at Citrix.Console.PowerShellSdk.DatabaseService.PSDatabaseService.AddControllerToDatabases(IEnumerable`1 databaseCredentials, String serviceGroupName, String configServiceAddress, ScriptExecutionContext context) at Citrix.Console.PowerShellSdk.SiteService.Scripts.JoinExistingSiteScript.RunScript() at Citrix.Console.PowerShellInteraction.PowerShellScript`1.Run() at Citrix.Console.DeliveryCenter.UI.Dialogs.JoinExistingSiteDialogViewModel.OkBackgroundOperation(IProgressReporter progressReporter) at Citrix.Console.CommonControls.ProgressDisplay.ProgressWindowOperation.PerformOperation() at Citrix.Console.CommonControls.ProgressDisplay.ProgressWindowViewModel.PerformAction(Action operationComplete) DesktopStudio_ErrorId : UnknownError ErrorCategory : NotSpecified DesktopStudio_PowerShellHistory : UpdateDatabaseScript
Solution 1
Add the correct permissions on the machine account per CTX127998 - Database Access and Permission Model for XenDesktop.
OR
Change the hostname of the controller being added or remove any previous references to the existing controller account using the following procedure:Execute the following query against the Xendesktop Site database:
select SID from sys.database_principals where name = ‘[Domain]\[Server]$’
If the SID returned in this query does not match the SID of the controller being added, back up the SQL server databases, and drop the outdated User with the following command:
drop user ‘[Domain]\[Server]$’
Solution 2
Complete the following steps:
In SQL MGMT Studio, go to Object Explorer and Expand the [databasename] and go to Security.
Click Schemas.
In summary window, determine which Schema(s) are owned by the user and either change the owner to ‘dbo’ or remove the Scheme(s).
Drop your user.
Add the controller back to the XenDesktop site.