One of our old SQL servers was running under the local system context. Then we decided to change the account that the SQL service runs under, and we created domain service account with basic domain user permissions.
Eventually, we end up with following error trying to access our SQL Server remotely.
SQL Server SPN Creation
To run SQL Server service you can use Local System account, local user account or a domain user account. If you are using Local System account to run your SQL Service the SPN will be automatically registered. Nevertheless, if you are using domain account to run SQL Server Service and you have domain user with basic user permissions (In our case) the computer will not be able to create its own SPN.
In case you are using domain administrator account, you will not have any problems.
SPN will be successfully created since domain account you are using to run SQL Server Service will have domain administrator-level credentials.
There are a couple of solutions for this problem.
Pay attention that you can have only one SPN and must be assigned to the appropriate domain/local account (current SQL Server service account)
Manually create SPN
There is really good article by Microsoft how to configure SPN for SQL Servers
How to Configure an SPN for SQL Server Site Database Servers
setspn -l servername
SPN for the NetBIOS name of the SQL Server will look like: MSSQLSvc/SQLServerName:1433
SPN for the FQDN of the SQL Server will look like: MSSQLSvc/SQLServerFQDName:1433
In my case I have just default instance, So I need to change just those with 1433 port number. If you have named instance port number depends on previous SQL Server configuration.
setspn -D MSSQLSvc/SQLServerName:1433 SQLServerName
setspn -A MSSQLSvc/SQLServerName:1433 Domain\Account
setspn –L Domain\Account
Write all properties permissions, Write msDS-PrincipalName
Another option is to elevate permissions for domain user you are using to run SQL Server Service. Of course, you will need AD access to accomplish this.
Those permissions should be enough to allow that domain user to create SPN.
Hello Zoran,excelent content, for me very utility,
congragulations,
thanks.
Thanks a lot Francisco. I am glad you find it useful.
thanks so much. this helped
You are welcome Nana:)
Auch von mir vielen Dank. Hat uns ebenfalls sehr geholfen.