PRB: Setspn fails if domain name differs from NetBIOS name where SQL Server SPN is registered (277658)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q277658
BUG #: 236041 (SHILOH)
		

SYMPTOMS

When you try to register the Service Principal Name (SPN) using the Setspn utility, if the NetBIOS name of the computer where SQL Server 2000 is running is different from the domain name, the following syntax is incorrect
setspn -A MSSQLSvc/Host:port serviceaccount
				
and will return the following error:
C:\>setspn -A MSSQLSvc/lphBar2.hemlock.com:1433 delegation

Registering ServicePrincipalNames for (null)

        MSSQLSvc/LPHBar2.hemlock.com:1433

Failed to assign SPN to account '(null)', 0x57    
				

WORKAROUND

To work around this problem, use the following syntax:
setspn -A MSSQLSvc/Host:port domainname/serviceaccount
				
For example:
C:\>setspn -A MSSQLSvc/lphbar2.hemlock.com:1433 hemlock/delegation 
				
In this example, "lphbar2" is the host name of the SQL Server, "hemlock" is the Microsoft Windows 2000 domain name, "delegation" is the SQL Server domain account under which SQL Server service is running, and "hemlock0" is the NetBIOS name of the SQL Server where the SPN is being registered. Note that the NetBIOS name of the SQL Server (hemlock0) and the Windows 2000 domain name (hemlock) are different.

MORE INFORMATION

For information on Delegation, see "Security Account Delegation" in SQL Server 2000 Books Online.

Modification Type:MinorLast Reviewed:12/28/2005
Keywords:kbprb KB277658 kbAudDeveloper