Using Kerberos configuration manager to resolve Microsoft SQL server SPN issues
It’s not uncommon to have authentication issues with Microsoft SQL Server. Not only with users trying to access the server, but problems related to the connection between instances, like AlwaysOn Availability Groups. The traditional way to solve it is well known, but not simple, as you need to work with the “setspn” command, and its syntax is not that intuitive. Here's an example: setspn –A MSSQLSvc/<SQL Server computer name>:1433 <Domain\Account> This week I was working on a SQL Server AG build, and guess what? I was not able to connect from one replica to another. The error message is not very intuitive: “The target principal name is incorrect. Cannot generate SSPI context. (Microsoft SQL Server)” This message could mean a lot of things, but there’s one thing that may help us: the target instance ERRORLOG. If you find the following messages, you have a SPN registration problem: The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/abc. domain:<Instance> ] for the SQL Server service. Windows return code: 0x2098, state: 20. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered. Ok, so let’s solve it… Fortunately, Microsoft has a tool called “Kerberos Configuration Manager”, that makes everything easier. The “Kerberos Configuration Manager” is a diagnostic tool, to be used with SQL Server, that helps troubleshooting Kerberos related issues. You can download the tool here. After the installation, go the application folder and execute “KerberosConfigMgr.exe” binary. Once the application is opened, click on connect, on the right top corner:
![](https://www.pythian.com/hs-fs/hubfs/Imported_Blog_Media/Picture1-1.png?width=583&height=402&name=Picture1-1.png)
![](https://www.pythian.com/hs-fs/hubfs/Imported_Blog_Media/Picture2-1.png?width=585&height=297&name=Picture2-1.png)
![](https://www.pythian.com/hs-fs/hubfs/Imported_Blog_Media/Picture3-1.png?width=537&height=272&name=Picture3-1.png)
![](https://www.pythian.com/hs-fs/hubfs/Imported_Blog_Media/Picture4.png?width=575&height=449&name=Picture4.png)
![](https://www.pythian.com/hs-fs/hubfs/Imported_Blog_Media/Picture5.png?width=575&height=454&name=Picture5.png)
![](https://www.pythian.com/hs-fs/hubfs/Imported_Blog_Media/Picture6.png?width=608&height=431&name=Picture6.png)
![](https://www.pythian.com/hs-fs/hubfs/Imported_Blog_Media/Picture7.png?width=620&height=187&name=Picture7.png)
Learn more about Pythian Services for Microsoft SQL Server.
Share this
Previous story
← MySQL 5.7 Multi-threads replication operation tips
Next story
To deliver value, understand It →
You May Also Like
These Related Stories
Examining distributed training of Keras Models
Examining distributed training of Keras Models
Jun 5, 2019
6
min read
The importance of Oracle database related kernel parameters (aio-max-nr) (with bonus track)
The importance of Oracle database related kernel parameters (aio-max-nr) (with bonus track)
Nov 21, 2017
4
min read
Chopt Utility
Chopt Utility
Oct 25, 2010
1
min read
No Comments Yet
Let us know what you think