Sql-server – SQL Server Management Studio login prompt will never forget users other than ‘sa’

sql serversql-server-2012ssms

When I login to a database, using some other user than 'sa', that username will stick the next time I login.

If I input the username sa and password then log in, the next time I open the login prompt for that server, it will not remember that I logged in as sa, but show the user not being sa.

Why?

Best Answer

Management Studio remembers each server that you connect to and the logins used to connect to them.

The logins are remembered in from the last new login used. For example if you connect to a server for the first time as 'sa' and then connect as 'bob', 'bob' will appear at the top of the login drop down. Then if you connect as 'tony' then 'tony' will appear at the top of the drop down.

Reconnecting to the different users will not change their order in the list and 'tony' will remain as the default login until a new user is used.

This list can removed by removing the Server from the Server Name drop down. This is done by expanding the server name list, hovering over the server name and pressing delete as detailed here: Deleting Old server names from "Connect to Server" dialog in SSMS