4

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

If I then input the username SA and password and logs 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?

  • do you have a registered server setup with the 'sa' username and password ? this free tool is nice for storing specific connections among many other things ssmsboost.com – DamagedGoods Jul 28 '14 at 11:38
  • So I need another tool to make sql server management studio use the correct username? – Anders Lindén Jul 28 '14 at 11:52
  • no Management studio, Registered Servers will store whatever username and password you desire and remember the password if you select the checkbox. SSMSBoost is simply a useful free tool for jumping between databases on different servers with different logins (without adjusting things such as default db's) – DamagedGoods Jul 30 '14 at 9:40
1

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

0

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? – Anders Lindén Jul 28 '14 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 '14 at 12:09
  • But I talk about remembering that I have used the SA user to login, a user that we know exists. – Anders Lindén Jul 28 '14 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 '14 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? – Anders Lindén Jul 28 '14 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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