Clearing SSMS History


For those of you who visit BeyondRelational regularly, you would have noticed that the web-site now has a new feature called “Ask”. The feature is a “personal forum” and allows you to approach one of the SQL Server experts associated with BeyondRelational directly with your queries. It facilitates a one-on-one interaction, which is what I prefer. The feature is still in the beta stage but with your support, it will definitely be a successful one.

Recently on the “Ask” feature, I received a question by one of the readers asking me how to clear out the SSMS history. For those of you who work with multiple SQL servers with multiple logins, the “Connect to Server” window seems to fill up very quickly, and starts to look something like this. Sometimes, these servers might not even be in existence (e.g.. if you frequently refresh your virtual RND/test environments).

image

You might notice that there is no way to clear out this history. So, how do you go about clearing out the clutter that working with SSMS generates?

The Manual Way

The following is a series of manual steps that you need to follow to clear out the SSMS history:

  1. Close all open instances of SSMS on your workstation
  2. Depending upon your version of the SSMS client tools, navigate to and delete the following:
  3. SSMS Client Tools Version Path File to Delete
    SQL 11 (“Denali”) %USERPROFILE%AppDataRoamingMicrosoftSQL Server Management Studio11.0 SqlStudio.bin
    SQL 2008 %USERPROFILE%AppDataRoamingMicrosoftMicrosoft SQL Server100ToolsShell SqlStudio.bin
    SQL 2005 %USERPROFILE%AppDataRoamingMicrosoftMicrosoft SQL Server90ToolsShell mru.dat
  4. Launch SSMS
  5. It might take a little while to launch, as it recreates the “SqlStudio.bin”/”mru.dat”. Once launched, you will see that all SSMS history is gone! All that remains is the list of servers installed on my test server

image

The Automated Way

Unfortunately, there is not wizard or button that one can click and magically clear out the history. A Microsoft Connect case has already been logged for introduction of the same (you can read the case here). Let’s hope that by the time the first of the SQL 11 RCs come out, this feature is part of them.

Until we meet next time,

Be courteous. Drive responsibly.

Advertisements

3 thoughts on “Clearing SSMS History

  1. Hardik Doshi

    Thanks for sharing.
    For SQL 2008, note that once you delete the SqlStudio.bin file, you will lose any configured SSMS settings, so you will have to reconfigure the settings: go to Tools -> Options and re-configure as needed.

    Like

    Reply
  2. Nakul Vachhrajani

    Thanks, Hardik. Yes, that is correct. All user customizations will need to be redone once the manual “reset” is done.

    Like

    Reply

Let me know what you think about this post by leaving your feedback here!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s