Answered by:
The target principal name is incorrect. Cannot generate SSPI context. (Microsoft SQL Server, Error: 0)
Question
-
Hi,
I just installed SQL one my box but I am unable to access SQL remotely while accessing remotely getting below error and services are running on domain account. As the services are running under domain account we have registered SPN (Service principal name ). Is there any other way to get it resolve this issue.
Registered SPN :
MSSQSLSvc/myserver:1433
MSSQSLSvc/myserver.domain1.com:1433ADDITIONAL INFORMATION:
The target principal name is incorrect. Cannot generate SSPI context. (Microsoft SQL Server, Error: 0)
Answers
-
Hello,
This article will surely help you
http://support.microsoft.com/kb/811889
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
- Marked as answer by Allen Li - MSFTModerator Sunday, September 22, 2013 8:08 AM
-
Hi lovelly,
This error may occur due to duplicate SPN,duplicate DNS entries created which was confusing the Kerberos authentication, the old SPN entry can be deleted by using the -D switch in setspn.exe and the correct SPN was created by using the following command.
setspn –A MSSQLSvc/<servername.domainname> accountname
please refer to the articles below to troubleshoot your issue.
SQL Network Interfaces: The target principal name is incorrect. Cannot generate SSPI context
http://www.power-programming.co.uk/post/2008/12/19/SQL-Network-Interfaces-The-target-principal-name-is-incorrect-Cannot-generate-SSPI-context.aspx
The 411 on the KDC 11 Events
http://blogs.technet.com/b/askpfeplat/archive/2012/03/29/the-411-on-the-kdc-11-events.aspxThanks
Candy Zhou
- Edited by Candy_Zhou Monday, September 16, 2013 9:12 AM edit
- Marked as answer by Allen Li - MSFTModerator Sunday, September 22, 2013 8:08 AM
All replies
-
Hello,
This article will surely help you
http://support.microsoft.com/kb/811889
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
- Marked as answer by Allen Li - MSFTModerator Sunday, September 22, 2013 8:08 AM
-
Hi lovelly,
This error may occur due to duplicate SPN,duplicate DNS entries created which was confusing the Kerberos authentication, the old SPN entry can be deleted by using the -D switch in setspn.exe and the correct SPN was created by using the following command.
setspn –A MSSQLSvc/<servername.domainname> accountname
please refer to the articles below to troubleshoot your issue.
SQL Network Interfaces: The target principal name is incorrect. Cannot generate SSPI context
http://www.power-programming.co.uk/post/2008/12/19/SQL-Network-Interfaces-The-target-principal-name-is-incorrect-Cannot-generate-SSPI-context.aspx
The 411 on the KDC 11 Events
http://blogs.technet.com/b/askpfeplat/archive/2012/03/29/the-411-on-the-kdc-11-events.aspxThanks
Candy Zhou
- Edited by Candy_Zhou Monday, September 16, 2013 9:12 AM edit
- Marked as answer by Allen Li - MSFTModerator Sunday, September 22, 2013 8:08 AM
-
Hi Shanky,
what's your SQL Server service log on account? Try switching it to Local System if it isn't, resart the service then try the connection again. It's working as a temporary "fix" for us untill we figure out what's wrong with the domain service account.
-
-
-
I did a wipe/reload and did a fresh install of Windows 10 Enterprise on one of our older machines. Prior it was on Win 7. Immediately after the update to Win 10 - I get the above listed error... The program runs but stops with the above listed error when it goes out to the SQL Server to read data into the program. While it was on Win 7 the program ran flawlessly. Any suggestions for this?
- Edited by K3JAE Thursday, December 20, 2018 6:01 AM better clarification