Can’t connect to SQL instance using Windows Authentication

Can’t connect to SQL instance using Windows Authentication

Windows
I had an odd issue at work where I could not connect to a SQL server using Windows authentication even though I had the authentication set to mixed mode. I was able to logon with the SQL authentication details but not with Windows authentication. I was presented with the following message - "The target principal name is incorrect. Cannot generate SSPI context." When looking into this it turned out that the SPNs were registered to a user object that did not run the service on the host of where the SQL Server was running. I use service accounts for SQL server, this one named SCCM-SQLSRV and this did not have the SPNs registered to it. To find out the user object/computer object that the SPNs are registered to you must…
Read More