Manage SQL Server Management Studio Connect to Server Name Drop Down List


By:   |   Updated: 2016-06-01   |   Comments   |   Related: More > SQL Server Management Studio


Problem

SQL Server Management Studio is a very useful tool to administer SQL Server instances. With SQL Server Management Studio installed on your machine or server, you can connect to many SQL Server instances and work on them in a single interface. SQL Server Management Studio caches the instances that you recently connected to in the Server Name drop down list in the Connect to Server window.  Is it possible to remove some of the instances, clear the list or take a backup of this list in order to use it on another machine?  Check out this tip to learn more.

Solution

SQL Server Management Studio (SSMS) caches the list of servers that you recently connected to. You can easily add a new server to the list by connecting to that server from Management Studio. In this tip, we will demonstrate how to:

  • Delete a SQL Server instance from the Connect to Server drop down list in SSMS
  • Clear all SQL Server instances from the Connect to Server drop down list in SSMS
  • Move the SQL Server instances from the Connect to Server drop down list in SSMS to another machine

Delete a SQL Server instance from the Connect to Server drop down list in SSMS

In order to delete a server from the list, open SQL Server Management Studio and start the Connect to Server window, then click on the Server Name drop down list as shown below:

SQL Server Management Studio Original Server Name Drop Down List

Use the arrow keys on your keyboard to select the server name that you need to remove from the list:

Highlight the instance of SQL Server you want to delete in SQL Server Management Studio

Once you highlight the instance (i.e. shaded blue), click on the Delete button from your keyboard and the instance will be removed from the list (the bottom instance in the screen shots):

Updated list of SQL Server instances in the Connect to Server interface

Clear all SQL Server instances from the Connect to Server drop down list in SSMS

In order to clear the list using the method from the previous section, you would need to go through all the servers one by one and delete them, as there are no multiple selection options.

A better way to drop the entire list at once is to clear the instances from the file (i.e. SqlStudio.bin) where SQL Server Management Studio saves the data.

In SQL Server 2012 and later, the file (i.e. SqlStudio.bin) can be found in the following path in the userís profile. Where the last number indicates the SQL Server Management Studio version, 12.0 here indicates SQL Server 2014:

  • %UserProfile%\AppData\Roaming\Microsoft\SQL Server Management Studio\12.0

You should close Management Studio before working on the file.

Open the folder then add an underscore as a prefix to the SqlStudio.bin file as shown below:

File path for the SqlStudio.bin file

Now, when you open SQL Server Management Studio, a new SqlStudio.bin file will be created with no instances populated in the drop down list as shown below:

Blank list Server names in SQL Server Management Studio Connect to Server drop down list

Move the SQL Server instances from the Connect to Server drop down list in SSMS to another machine

To move the SQL Server instances from the Connect to Server drop down list in SSMS to another machine all you need to do is copy the SqlStudio.bin file as a backup and paste it on another machine in order to use the same instance names.

Next Steps
  • You should make sure that you really need to drop the entire list by renaming the SqlStudio.bin file prior to making changes.
  • Read more SQL Server Management Studio Tips


Last Updated: 2016-06-01


get scripts

next tip button



About the author
MSSQLTips author Ahmad Yaseen Ahmad Yaseen is a SQL Server DBA with a bachelorís degree in computer engineering as well as .NET development experience.

View all my tips
Related Resources





Comments For This Article





download





Recommended Reading

Different Options for Query Results in SQL Server Management Studio

Display Line Numbers in a SQL Server Management Studio Query Window

Connect to SQL Servers in another domain using Windows Authentication

Executing large scripts in SQL Server Management Studio with Insufficient Memory Failures

Top 5 SSMS Time Saving Tips








get free sql tips
agree to terms