Learn more about SQL Server tools

mssqltips logo

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Scripts          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories


Steps to clear the server list in SQL Server Management Studio

By:   |   Last Updated: 2011-03-07   |   Comments (9)   |   Related Tips: 1 | 2 | 3 | 4 | More > SQL Server Management Studio


Generally we connect to several SQL Server instances. Once connected successfully, this server history is shown in the drop down list as shown below. In some cases we might have similar names for servers as such as using P for production, D for Development, U for UAT and T for Test environments. Because of this there may be a chance that we connect to the wrong server. Also, there may be times when we connect to servers infrequently or a server may go away, but the name is still in the list. For these types of scenarios we want to clear the server list and only show servers we really need to work with, but unfortunately there is not an option within SSMS.

how to clear the the server list in sql 2005 and sql 2008


Unfortunately there is not a simple solution to clear the history from within SSMS, but following the below steps for SQL 2005 and SQL 2008 you can clear the history.

Step 1

Make sure that the "SQL Server Management Studio" is not opened.

Step 2

Open a run box as shown below and enter:

For SQL Server 2005
%APPDATA%\Microsoft\Microsoft SQL Server\90\Tools\Shell\

For SQL Server 2008
%APPDATA%\Microsoft\Microsoft SQL Server\100\Tools\Shell\

make sure ssms is not opened

Step 3

The above command will open the application data folder of your logged in account and then do the following.

SQL Server 2005
Search for file mru.dat and you can either rename or delete this file.

SQL Server 2008
Search for file SqlStudio.bin and you can either rename or delete this file.

Note that if you use Run As... to open SSMS, you have to change the profile name in the path to match the Windows account and delete the appropriate file.

the command will open the application data folder of your logged in account

Step 4

Once you renamed or deleted the mru.dat or SqlStudio.bin file and start SSMS againg you will not see any recent servers in the list.

once you completed the task, start ssms again and you will not see any recent servers

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. Do this go to Tools -> Options and re-configure as needed.

for sql 2008 you will have to reconfigure ssms settings

Next Steps
  • If you are using SQL 2008, document the required options which you have set, so you can reconfigure after renaming/deleting the file
  • Hopefully a future release will make this a simpler task, but for now add this to your list of tricks to help better manage your environment.

Last Updated: 2011-03-07

get scripts

next tip button

About the author

Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Email me updates 

Signup for our newsletter
 I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.


Tuesday, December 19, 2017 - 9:02:43 PM - Houman Back To Top

Worked Perfect .. thanks. great job!

Tuesday, June 30, 2015 - 5:43:40 AM - chandanu Back To Top

Super Jagul shah . it worked perfectly +1 for you :)

Saturday, June 20, 2015 - 3:31:40 PM - AMAN Back To Top

Thank you very much BOSS , I want this solution from quite long ..Finally Got the solution..Thanks again


Thursday, August 08, 2013 - 8:20:44 AM - Sajeesh Back To Top

Thanks for posting this solution!!

Friday, October 26, 2012 - 2:57:16 AM - Harshana Back To Top

 Superb! It worked. Thanks a lot


Thursday, September 20, 2012 - 8:54:05 AM - sree Back To Top

 Super! It worked.

Tuesday, March 08, 2011 - 7:55:43 AM - rajnikantv Back To Top

Good Article..

you can delete them from Registry



Monday, March 07, 2011 - 7:55:42 AM - Sergii Lazurenko Back To Top

Good job as always. Thanks

Monday, March 07, 2011 - 12:19:13 AM - Boskey Back To Top

Thanks!!!, I am struggling for long time to get this list clear.

Learn more about SQL Server tools