How to control the order of servers listed in the SSMS connection dialog?

Use Registered Servers or set up a Central Management Server (CMS). I recommend the latter if you can take the (small) time to set up the infrastructure because it will allow everyone to see the same list of servers, instead of just you (Registered Servers are stored in the registry). The only "drawback" with a CMS is that you have to use Windows Authentication because passwords aren't persisted to disk.

Both these features allow you to maintain an ordered/grouped list of servers, and manage servers as groups. This is very powerful because Policy-Based Management is tightly integrated with the GUI.

This works with all server versions -- I run SSMS 2012 and manage 2005-2012 servers. A CMS server can be set up on an Express edition, so licencing isn't a concern; however, I do recommend taking system database backups so the server list is recoverable.


You can't control this order unless you hack into SqlStudio.bin, or remove entries and re-add them in the order you want. Workarounds include:

  • You can delete individual entries manually (it's not intuitive - press the delete key for the highlighted item in the dropdown) - see this SQL Server blog post: http://blogs.msdn.com/b/managingsql/archive/2011/07/13/deleting-old-server-names-from-quot-connect-to-server-quot-dialog-in-ssms.aspx
  • Just deleting the SqlStudio.bin file entirely (when SSMS is closed). When you restart SSMS, the MRU list will be empty, since a new bin file will be created.
  • You can use a script like this one: http://social.msdn.microsoft.com/Forums/en-US/sqltools/thread/94e5c3ca-c76d-48d0-ad96-8348883e8db8/
  • You can use a custom-built UI like this one (note that I have not tested this): http://www.walkersretreat.co.nz/files/SSMSMRU.zip
  • I've blogged about this problem as well: https://sqlblog.org/2009/03/18/managing-the-mru-list-for-the-connect-to-server-dialog-in-ssms

Note that the order will get messed up as soon as you connect to a server that's not in the first position, since it really is an MRU list (where the most recent connection is listed first).

You can see more details in these SO questions:

  • https://stackoverflow.com/questions/6230159/how-to-delete-server-entries-in-sql-server-management-studios-connect-to-serve

  • https://stackoverflow.com/questions/1059105/how-to-remove-server-name-items-from-history-of-sql-server-management-studio

And you can see the bug that I filed that initiated the ability to use the delete key:

  • http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=424800

And other bugs that have sprung up as a result:

  • http://connect.microsoft.com/SQLServer/feedback/details/564834/ssms-change-connection-dialog-should-offer-registered-servers

  • http://connect.microsoft.com/SQLServer/feedback/details/683641/ssms-add-tooltip-to-connect-to-server-mru-entries

  • http://connect.microsoft.com/SQLServer/feedback/details/542304

  • http://connect.microsoft.com/SQLServer/feedback/details/624073/connect-to-server-screen-has-duplicate-instance-names-in-server-name-list