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.



2 Answers 2


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


Probably by design. Obfuscation of the highest level of username makes sense to me... security through obscurity.

  • How would remembering the username I use when I login be less obscure? Jul 28, 2014 at 11:54
  • I can imagine a situation where you connect to the database from somewhere unusual to do some trouble shooting. For instance I installed SSMS on a users machine once and connected to the DB from their machine because they were getting DB errors nobody else was. In order to diagnose them I had to use a high level login - not something I wanted them to know even existed. I also had to leave SSMS on their machine until the problem was solved. I aren't saying that this is exactly why, it could be a bug, but this just makes sense to me from a security perspective.
    – blobbles
    Jul 28, 2014 at 12:09
  • But I talk about remembering that I have used the SA user to login, a user that we know exists. Jul 28, 2014 at 12:17
  • You know it exists, I know it exists, DBA's all know it exists... but the casual user who wants to create some havoc in the system and has overheard or found out some admin passwords probably doesn't. Making the highest level account name on the server more visible does nothing to increase security. Do you write down all your Network Administrator user names so any user can find it? Or put it on a public server? Even without the password it is information a potential hacker or malicious user can use.
    – blobbles
    Jul 28, 2014 at 12:44
  • You talk about everyday users meaning people that normally only uses computers to pay bills that heard a password we use and that cannot google which account that is used by admins in sql server but manages to open sql server management studio on my password protected job computer that is inside walls that are locked when I am not here and finds out how to open the login prompt and puts a valid server name under "server name", but luckily also finds out that Login has already been filled in? Jul 28, 2014 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.