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).
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:
- Close all open instances of SSMS on your workstation
- Depending upon your version of the SSMS client tools, navigate to and delete the following:
- Launch SSMS
- 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
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 |
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.
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.
LikeLike
Thanks, Hardik. Yes, that is correct. All user customizations will need to be redone once the manual “reset” is done.
LikeLike
A resolution to this is now available in SQL 11 (“Denali”) CTP03 – [http://beyondrelational.com/justlearned/posts/440/ssms-for-sql-server-denali-allows-deleting-history-from-the-server-name-list-in-the-connection-dialog.aspx][1]
[1]: http://beyondrelational.com/justlearned/posts/440/ssms-for-sql-server-denali-allows-deleting-history-from-the-server-name-list-in-the-connection-dialog.aspx
LikeLike