XenDesktop- 7.15- delivery controller won't connect to the SQL database with error: "Cannot generate SSPI context"

XenDesktop- 7.15- delivery controller won't connect to the SQL database with error: "Cannot generate SSPI context"

book

Article ID: CTX237568

calendar_today

Updated On:

Description

Delivery controller won't connect to the database after changing the SQL service account to a domain username on SQL Server. When running the SQL.UDL test from the Delivery Controller, we are getting: Microsoft Data Link Error: "Cannot generate SSPI context"

User-added image

Resolution

Follow below steps to resolve this issue:

Per https://support.citrix.com/article/CTX209470 the problem could be related to SPNs.(Service Principal name). 

Follow the instructions detailed in the following article to create a new SPN for the SQL database server: https://technet.microsoft.com/en-us/library/bb735885.aspx
  • To create an SPN for the NetBIOS name of the SQL Server use the following command: setspn –A MSSQLSvc/<SQL Server computer name>:1433 <Domain\Account>
     
  • To create an SPN for the FQDN of the SQL Server use the following command: setspn -A MSSQLSvc/<SQL Server FQDN>:1433 <Domain\Account>

After creating the SPN for the FQDN of the SQL server, DDC should be able to connect to the SQL database with the new credentials and it should restore the studio functionality.


 

Problem Cause

Changing the SQL service account from SA to domain user account without changing or creating  SPN  (service Principal name) for the new  SQL Server service account

 

Issue/Introduction

Delivery controller won't connect to the database after changing the SQL service account to a domain username on SQL Server. When running the SQL.UDL test from the Delivery Controller, we are getting: Microsoft Data Link Error: "Cannot generate SSPI context"

Additional Information

Unable to contact Database error "Cannot generate SSPI context" -  https://support.citrix.com/article/CTX209470

How to Configure an SPN for SQL Server Site Database Servers - https://technet.microsoft.com/en-us/library/bb735885.aspx