SSMS 2008 using last entered username as default login

  • Anyone else noticed this (somewhat annoying) behaviour in SSMS 2008.

    Open a new query window, and connect using a SQL Server authentication user ie : SQLUser1

    Open another query window to the same server, and the default username in the login box will be SQLUser1. Replace this with a different SQL Server authentication user ie : SQLUser2, and connect.

    Open a third query window, the default this time will be SQLUser2. Choose from the drodown box SQLUser1 and connect.

    Open a fourth window, the default will again be SQLUser2.

    It seems that the default stays at the last entered username, rather than the last used username.

    Does anyone have any idea how to chnage this, or even how to empty this list?

    The reason that this is annoying is that (in the given scenario above) I use SQLUser1 most of the time, hence why it was the first one used. But at some time since, I have used SQLUser2 to test something or other. But now everytime I am given SQLUser2 as the default.

    Kev

  • it looks like it uses the last name that was used for that particular instance. if you connect with sqluser1, then sqluser 2, then close all query windows, disconnect in object explorer, re-connect with sqluser1, disconnect, then re-connect again, sqluser1 should be in the drop down by default. I just did that and it seemed to work for me, but might have just been luck.

    This link will tell you how to clear all of the connection info from that connection window:

    http://blog.sqlauthority.com/2008/11/05/sql-server-clear-drop-down-list-of-recent-connection-from-sql-server-management-studio/

    hope that helps,

    Steve

  • Correction: With what I said about the login being remembered, it only remembers sql vs windows authentication in that scenario. I chose SQL auth, connected with sqluser1, then close the windows; connected with windows auth; disconnected, and then when i reconnected, it remembered Windows auth was the last that i used. For the SQL auth box, sqluser2 was still the default login to use for that instance.

    I'd say this is something that should be submitted to MS to look at.

    Good find.

    Steve

  • Steve,

    thanks for the feedback. Yes I should have probably stated it was all SQL auth.

    Will probably raise it on Connect, just wanted to sanity check it here first - make sure I wasn't missing something obvious.

    I'll try that link too and report back!

    Kev

  • An update.

    The item on Connect isn't exactly the same thing, but it's asking for the kind of functionality I was looking for - i.e. being able to manage the connections that are 'stored'.

    As for the link to blog.sqlauthority.com, the post[/url] there wasn't quite correct, however a comment on the post got me going in the right direction.

    It's also worth noting that as well as clearing all the connection details from SSMS, it's not really documented as to what else this might affect, so use at your own risk! You may want to rename these files if not too sure!

    For SQL2005, the file you want to remove is mru.dat, for SQL2008 it is sqlstudio.bin

    usually found in:

  • XP :- C:\Documents and Settings\user\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\
  • Vista :- C:\Users\user\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\Shell\
  • replace '90' in the directory structure with '100' if using SQL2008

    Kev

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply