SPN(Service Principal name)服务器主体名称

来源:互联网 发布:sql查询语句大全讲解 编辑:程序博客网 时间:2024/05/29 17:28

SPN(Service Principal name)服务器主体名称。

SPN 是服务在使用 Kerberos 身份验证的网络上的唯一标识符。它由服务类、主机名和端口组成。在使用 Kerberos 身份验证的网络中,必须在内置计算机帐户(如 NetworkService 或 LocalSystem)或用户帐户下为服务器注册 SPN。对于内置帐户,SPN 将自动进行注册。但是,如果在域用户帐户下运行服务,则必须为要使用的帐户手动注册 SPN。


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

, last updated April 16, 2012

  • Print this article
How to Register a Service Principal Name (SPN) With an SQL Server Agent thumbnailAn SPN makes authenticating with Kerberos possible.

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.

Other People Are Reading

  • How to Configure MS SQL 2008 for SQL Server Authentication
  • How to Register System.Web.Dll to an SQL Server 2008 Assembly

Instructions

    • 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 SQLServer Configuration Manager to change the "Log on as..." account for the SQL Server Agent to the domain account.

    • 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

      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

      Restart the SQL Agent Server on the SQL Server.


Read more: How to Register a Service Principal Name (SPN) With an SQL Server Agent | eHow.comhttp://www.ehow.com/how_7205044_register-_spn_-sql-server-agent.html#ixzz2GzhZTnjQ