How do I add an SPN?

John Savill

May 22, 2007

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Using the Windows 2003 Support Tools utility Setspn, you can add SPNs by using the -a switch, passing the full information for the SPN and the account it's to be associated with. For example, to register a SQL Server service with the jsavill account (assuming I'm running SQL Server under the jsavill account, which probably wouldn't be the case), I would use

C:>setspn -A MSSQLSvc/johnpc.savilltech.net:1433 savilltechjsavill
Registering ServicePrincipalNames for CN=John
Savill,OU=Users,DC=savilltech,DC=net
MSSQLSvc/johnpc.savilltech.net:1433
Updated object

Notice the format of the SPN should follow the "service type"/"instance name":"port"/"service name" format, but because the service name and type were the same (MSSQLSvc), the service name was omitted from the command line.During SPN creation, the system checks that the account name passed is valid. Once registered, the SPN is viewable, as follows:

C:>setspn -l savilltechjsavill
Registered ServicePrincipalNames for CN=John
Savill,OU=Users,DC=savilltech,DC=net:
MSSQLSvc/johnpc.savilltech.net:1433

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like