(EDIT: I think this is sufficiently different from The target principal name is incorrect. Cannot generate SSPI context to not be a duplicate.)
We've got two servers (SQL01
and SQL02
) in the same domain. SQL Server on SQL02 can connect to SQL Server on SQL01, but not vice versa. On each node, ping -a
and telnet mumble 1433
work fine. I've tried all combinations of non- and fully-qualified server names, with and without port number.
The only difference is that SPN on node 2 has two extra entries (circled in red). Should I delete them from node 2, or add similar records to node 1?
Node 1:
C:\Users\mumble>hostname
EW0VPNYWSQL01
C:\Users\mumble> sqlcmd -E -S EW0VPNYWSQL02.NYEZPCI.LOCAL,1433
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : SQL Server Network Interfaces: The target principal name is incorrect.
.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Cannot generate SSPI context.
Node 2:
C:\Users\mumble>hostname
EW0VPNYWSQL02
C:\Users\mumble>sqlcmd -E -S EW0VPNYWSQL01.NYEZPCI.LOCAL,1433
1
Yes, do the following steps:
Stop SQL Server service + SQL Agent on SQL02
Delete "MSSQLsvc" SPN's manually
Run:
setspn -d MSSQLSvc/EW0VPNYWSQL02.NYEZPCI.com:1433 NYEZPCI\EW0VPNYWSQL02
Run:
setspn -d MSSQLSvc/EW0VPNYWSQL02.NYEZPCI.com NYEZPCI\EW0VPNYWSQL02
Start SQL Server service + SQL Agent on SQL02
I guess that at one time, the SQL Server service has been started with NT SERVICE\MSSQLSERVER
, before changing it to a domain service account