Printed 2017/02/21 10:51AM

Understanding Kerberos, Part II


The majority of the time, the problems I see with Kerberos are due to a bad SPN (Service Principal Name) configuration. So in this post we'll talk about what an SPN contains and how it should look. An SPN contains several pieces of information:

Books Online covers what this should look like depending on your version of SQL Server: 2005 | 2008 | 2008R2. If you look carefully at the language, you'll note that in the 2008/2008R2 versions of Books Online, there is a note about the fact that the port was dropped for connections that are not TCP/IP based, like Named Pipes and Shared Memory. Therefore, we have different cases as to how we should do the SPNs based on the version of SQL Server we are talking about. The biggest challenge is getting the service + server name/port right, so that's what we'll focus on today. Tomorrow we'll look at using SETSPN to check SPN entries and how to add and remove them.

For 2005:

Default Instance:

Named Instance (assuming it's listening on port 9999):

If you look at the recent documentation, you'll only see examples with the latter of the two SPNs ( This is the Fully Qualified Domain Name (FQDN) version. You don't see the shorter example (MyServer) which we typically refer to as the NetBIOS name. All the KB articles put out by Microsoft used to have both and in fact, some of the auxiliary products, like SharePoint have docs that still indicate to put in both. I always err on the site of caution, meaning I'll put in both. Is it strictly required? No, not if DNS is set up correctly on your clients (and they should be if you're doing Kerberos).

For 2008 and later:

Default instance:

Note that the TCP port isn't required. In fact, if you want to use Named Pipes or Shared Memory, the SPN shouldn't have the port number. With that said, there's nothing wrong with having both, so far as I am aware:

Named Instance (assuming instance name of Named and port of 9999):

Note the change from port 999 to the instance name of Named. This allows for the Named Pipes and Shared Memory connections. Again, I err on the side of caution:


Copyright © 2002-2017 Redgate. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.