The target principal name is incorrect. Cannot generate SSPI context. (Microsoft SQL Server, Error: 0)


I have added a new PC to the domain where the SQL server resides,
However, when I try to login to the sql server using windows authentication I get the following error:

Cannot connect to a2\a.


The target principal name is incorrect.  Cannot generate SSPI context. (Microsoft SQL Server, Error: 0)

1. I am able to connect from the same pc using SQL AUTH without any problems.
2. I have other PC's I added to the domain and I was able to login to the SQL server using windows auth without an issue.
3. on this PC I am unable to login using windows auth with ANY domain user, even with users that I confirm working from other PC's on the domain.
4. I tested ping , dns and such its all good.

How to proceed?
Who is Participating?
becraigConnect With a Mentor Commented:
1.. Verify you do not have a duplicate SPN (This more seems like your issue)
Very detailed info on resolving spn issues:

Your new computer might not be properly registered in the AD.

I would just disjoin and rejoin the domain and re-test
Sounds like your new client PC may have a domain issue. It's not being trusted by the domain controller.

You mention that you can't connect with windows authentication... have you tried a SQL server login?  if you can connect with a SQL login (not windows credentials), it would reinforce that the client isn't being trusted by the Domain.
kelso109Author Commented:
Thanks, I will give it a try.
Mohammed TahirCommented:
It seems secure channel is broken, so disjoin and rejoin the PC from domain.

kelso109Author Commented:
di join and re join to the domain worked!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.