Deleting Old server names from "Connect to Server" dialog in SSMS

In an earlier Denali CTP, we had introduced a mechanism for customers to delete the un-used/not required server names from the drop down in connection box in SSMS. There has been a big customer ask for helping them remove the redundant server names from the MRU list.

Here is a blog post from Devesh Nagpal, a developer in the SQL Server Manageability Team describing this new feature in SQL Server Code Named “Denali” CTP3.

--

There are a few undocumented ways on doing this as mentioned here,

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

https://sqlblog.com/blogs/aaron_bertrand/archive/2009/03/18/managing-the-mru-list-for-the-connect-to-server-dialog-in-ssms.aspx

The problem with using undocumented feature were

1) There were side effects of doing it like losing SSMS specific Tools | Options settings, OE Details List View Customizations, the MRU list for OE Details Search, and MRU for Reports.

2) There was no official support from Microsoft.

We will now be supporting Deleting the server name from MRU list officially. This will help customers remove any Server name from the drop down list they do not wish to see. With regard to addition of servers to this list, there is no change to the earlier behavior – the server name will get appended to the list once you connect to it.

Here is a simple demonstration of how you can now easily remove the Server names from MRU list from CTP2 Denali.

As shown in the picture below there might be multiple machines you have connected to in SSMS. All will be shown in history sorted by when you have last used them.

clip_image001

To delete the dead servers from the list, select the name you want to delete either via mouse or via keyboard. As shown in the image below.

clip_image002

Now press the delete key on the keyboard, the item will be deleted from the list.You can delete as many items as you want. Note that the text in the box will remain to your last selection even after delete.

clip_image003

Current Limitations

1) No multiple select and delete, the delete has to be one by one for server names. There is no multiple select and delete option.

2) You will have to rely on keyboard for actually deleting the item, right click on item and then deleting it is not supported.

3) There is no global list to keep track of the server names users have deleted and not to add them in the list again. The list will be re-populated once the user connects to a new server name (which is not present in the list).

Devesh Nagpal can be reached at devnag@microsoft.com.