How to Register a Service Principal Name (SPN) With an SQL Server Agent

Written by brian richards
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Register a Service Principal Name (SPN) With an SQL Server Agent
An SPN makes authenticating with Kerberos possible. (keyboard #6 image by Adam Borkowski from

Register a service principal name (SPN) for your Microsoft SQL Server in order to permit service accounts and users to both find your server and authenticate to it with Kerberos authentication. While administrators typically perform this configuration for the SQL Server service account, doing so for the SQL Server Agent account enables trouble-free authentication for jobs, monitors and other automation tasks on the server.

Skill level:


  1. 1

    Configure SQL server to use a domain account for the SQL server agent. Create an account in Active Directory Users and Computers for the SQL Server agent, and then use the SQL Server Configuration Manager to change the "Log on as..." account for the SQL Server Agent to the domain account.

  2. 2

    Configure the service principal name. Open a command prompt using a domain account with permission to modify the SQL Agent service account. Type the command "setspn --A MSSQLSvc/<SQLAgentAccount>:1433 <domain\SQLAgentAccount>," where <SQLAgentAccount> is the name of the SQL Server Agent account and <domain\SQLAgentAccount> is the account name with the domain preceding it.

  3. 3

    Confirm the configuration of the SPN by entering the command "setspn -l <SQLAgentAccount>," where <SQLAgentAccount> is the name of the domain account used by the SQL Server Agent.

  4. 4

    Restart the SQL Agent Server on the SQL Server.

Tips and warnings

  • Most enterprises do not need to register an SPN for the SQL Server Agent account, but will if the SQL Server is deployed on a failover cluster.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.