A Citrix XenApp/XenDesktop Controller Service failed to connect to the database with current connection settings

A Citrix XenApp/XenDesktop Controller Service failed to connect to the database with current connection settings

book

Article ID: CTX231023

calendar_today

Updated On:

Description

Health Check detected that one of the following XenApp/XenDesktop services failed to connect to the database with current connection string settings:

ADIdentity Service
Analytics Service
AppLibrary Service
Broker Service
Configuration Service
Delegated Admin Service
Environment Test Service
Host Availability Service
Machine Creation Service
Monitor Service
StoreFront Service
Trust Service
Orchestration Service

For more information about these services, refer to CTX139415- XenDesktop 7.x Services Overview

Resolution

Check database connection settings and user permissions.

To check the database connection settings:

1. On the Delivery Controller, open a PowerShell command window.
2. Type `asnp  Citrix*`.
3. Type `Get-AdminDBConnection` to generate the database server hostname.
4. Confirm that the server hostname is valid. If mirroring is used, confirm that the failover partner is correct. 
5. If hostname is not valid, need to null out currrent setting. Each service one has it's own connection string on every controller 
6. Set-[Admin]DBConnection $NULL (services needs to be nulled in the correct order, Delegated Admin, CentralConfig, ConfigLogging need to be last when nulled, and first when re-set)
7. Set-[Admin}DBConnection $connectionstring 

Connectionstring examaple: Server=SQLServer; Initial Catalog=CitrixSitenameSite;Integrated Security=True


To check database user permissions, refer to Determining Effective Database Engine Permissions on the Microsoft web site for more information.

Problem Cause

The Database cannot be reached, a Citrix XenApp/XenDesktop Controller Service failed to connect to database with current connection settings.