Cannot join a new Delivery Controller server to an existing farm.
This error is noticed even when the user who runs the command is a DB owner. Giving permissions to the user account is not sufficient in this case. The machine account contacting the database should also have logon permissions. Otherwise, the following database authentication failure occurs.
Login failed for “Machine account”.
To resolve this issue, re-run the PowerShell commands to join the existing site.
When joining a new Delivery Controller (Controller) server to point to an existing database using PowerShell commands, the following error appears:
Set-EnvTestDBConnection : There was a problem communicating with the Citrix Delegated Administration Service.
+ Set-EnvTestDBConnection <<<< -DBConnection "Server=xxxxx;Database=xxxxx;Trusted_Connection=True"
+ CategoryInfo : PermissionDenied: (:) [Set-EnvTestDBConnection], UnauthorizedAccessException
+ FullyQualifiedErrorId : Citrix.XDPowerShell.Status.AuthorizationError,Citrix.EnvTest.Sdk.Cmdlets.DataStore.Comma
nds.SetEnvTestDBConnectionCommand
For XenDesktop 7, use the commands specified in CTX138682 - XenDesktop Studio Message: "Re-enter the Controller address or try a new one" to point to an existing database
For XenDesktop 5 and 5.6, use the commands as specified in CTX128365 - How to Move Existing XenDesktop 5.x Database to New SQL Server to point to an existing database.