I have Windows 11 22H2 and SSMS 19.1.56 on my new laptop.
Sometimes (I've only had the new laptop one week) I can connect to SQL server in SSMS and some days (or part of days) I get "The target principal name is incorrect. Cannot generate SSPI context. (Microsoft SQL Server, Error: 0)"
Today I was able to connect successfully (after rebooting laptop twice), see databases, expand databases to view tables and run queries.
About an hour later, when attempting to expand one of the databases to take a look at a stored procedure, I got the following message when attempting to expand the database to access the stored procedure in the Programmability folder :
"Failed to connect to server. The target principal name is incorrect. Cannot generate SSPI context. (Microsoft SQL Server, Error: 0)" And the + sign next to database name disappears.
I then tried to refresh the connection to the server by right clicking the server name in the Server Explorer and select Refresh - and got this message:
"Failed to retrieve data for this request. ...The target principal name is incorrect. Cannot generate SSPI context. (Microsoft SQL Server, Error: 0)"
However, in the query window I can still run querier toward the database that generated the first error message when I tried to expand it.
I can run queries against any of the databases, even all those that threw "failed to connect" errors when attempting to expand to see tables. But I can't expand them to see the tables or stored procedures.
Why does Server Explorer throw errors, when I can target the databases fine using Query window?
I have the identical setup on Windows 10 and SSMS 19.1, targeting the identical server and it works like a charm.
Why is it not working with Windows 11? I tried connecting via IP as well, but that renders SSMS useless. It becomes so slow I can't do anything, not even expanding a database.
I'm unable to transition to my new laptop because I can't get SSMS to work.