My local computer's operating system is Windows 10 Professional.
We have a remote server named XXXXAD01. Its operating system is Windows Server 2016 Standard. It is part of a Domain ISYYYY.ZZZZZ. It has 2016 SQL Server installed as MSSQLSERVER (default instance).
I renamed the remote server's SQL Server to XXXXAT01 using this procedure:
- I made remote desktop connection to it.
- Inside I open SQL Server Management Studio 18 and connect to the server using Windows Authentication.
sp_dropserver XXXXAD01; gocommand.
sp_addserver XXXXAT01, local; gocommand.
- I open SQL Server Configuration Manager and restart the SQL Server service (MSSQLSERVER).
- Confirm in SQL Server Management Studio that
@@SERVERNAMEis now returning XXXXAT01.
Then the remote server itself was renamed to XXXXAT01 by the network guys. And rebooted.
Now here is the issue:
I can make remote desktop connection to XXXXAT01 and from inside I can open SQL Server Management Studio and connect to XXXXAT01 server using Windows Authentication and run my queries.
But if open my local SQL Server Management Studio from my PC, and try to connect to XXXXAT01 server using Windows Authentication, I get this error:
Cannot connect to XXXXAT01.
Additional information: The target principal name is incorrect. Cannot generate SSPI context. (Microsoft SQL Server)
What could be the reason and what is the solution?