Event
Viewer:
Unknown SQL
Exception 0 occurred. Additional error information from SQL Server is included
below.The target principal name is incorrect. Cannot generate SSPI
context.
Solution:
Logon to the SQL server using
Domain Admin rights.
Start command prompt as
Administrator:
setspn -L MyDomain\MyUserName
Registered ServicePrincipleNames for CN=MyUserName Service Account, OU=Service Accounts, DC=MyDomain,DC=com: mssqlsvc/MyServer1.MyDomain.com:MyPort mssqlsvc/MyServer2.MyDomain.com:MyPort mssqlsvc/MyServer3.MyDomain.com:MyPort
setspn -L MyDomain\MyUserName
Registered ServicePrincipleNames for CN=MyUserName Service Account, OU=Service Accounts, DC=MyDomain,DC=com: mssqlsvc/MyServer1.MyDomain.com:MyPort mssqlsvc/MyServer2.MyDomain.com:MyPort mssqlsvc/MyServer3.MyDomain.com:MyPort
Note: MyUserName will be SharePoint Timer
Service account, this is SharePoint Farm account
If you are getting the error (Cannot generate SSPI context), you will not find the SQL server name in the list displayed by the command.
To Register your SQL server type the following command.
setspn -A MSSQLSvc/MyServer.MyDomain.com:1433 MyDomain\MyAccount
Note:- MyServer will be the SQL server name to which you are not able to connect.
Again run the setspn -L MyDomain\MyUserName command, you should find your SQL servers FQDN registered.
If you are getting the error (Cannot generate SSPI context), you will not find the SQL server name in the list displayed by the command.
To Register your SQL server type the following command.
setspn -A MSSQLSvc/MyServer.MyDomain.com:1433 MyDomain\MyAccount
Note:- MyServer will be the SQL server name to which you are not able to connect.
Again run the setspn -L MyDomain\MyUserName command, you should find your SQL servers FQDN registered.
No comments:
Post a Comment