Failed to open database connection. Error: The target principal name is incorrect. Cannot generate SSPI context.
search cancel

Failed to open database connection. Error: The target principal name is incorrect. Cannot generate SSPI context.

book

Article ID: 164337

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

Trying to install ITMS 8.x fails during the database configuration on the SQL box.

Failed to open database connection. Current user is DS\Administrator. Error: The target principal name is incorrect.  Cannot generate SSPI context.

Environment

ITMS 8.x

Windows 2012 R2 

Cause

Missing rights for:

Read servicePrincipleName
Write service PrincipalName

 

Resolution

Log in to the server running your Active Directory service and execute the following steps:

  • Run Adsiedit.msc
  • In the ADSI Edit snap-in, expand Domain [YourDomainName], expand DC= RootDomainName, expand CN=Users, right-click CN= [YourAccountName, and then click Properties.
  • In the CN= AccountName Properties dialog box, click the Security tab.
  • On the Security tab, click Advanced.
  • In the Advanced Security Settings dialog box, select one (any) of "SELF"'s row
  • Click Edit to open Permission Entry dialog box.
  • Make sure Principal is "SELF", Type is "Allow" and "Applied to" is "This Object Only", in Properties section, select the properties below:
    • Read servicePrincipalName
    • Write servicePrincipalName

Click OK to apply all changes and exit the ADSI Edit snap-in

Finally, you need to restart the SQL Service(s) that use the account in question.