views:

2990

answers:

5

When trying to connect to a server in Management Studio (specifically 2008), there is a field where you enter the Server name. That field also has a drop-down list where it shows a history of servers that you have attempted to connect to.

I would like to know:

  1. How to remove an individual item from that history.
  2. How to remove an item from the Login field history for each Server name.

Thanks!

+9  A: 

For SQL 2005, delete the file:

C:\Documents and Settings\<USER>\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat

For SQL 2008, the file location, format and name changed:

C:\Documents and Settings\<USER>\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin

How to clear the list:

  1. Shut down all instances of SSMS
  2. Delete/Rename the file
  3. Open SSMS

This request is registered on Microsoft Connect

Raj More
I open the SqlStudio.bin, the file is big, it seems possible contain other information,what will lose other than connection history?
SilverNight
+1  A: 

In Windows Server 2008 standard with SQL Express 2008, the "SqlStudio.bin" file lives here:

C:\Users[SomeUser]\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\

A: 

From the Command Prompt (Start \ All Programs \ Accessories \ Command Prompt):

DEL /S SqlStudio.bin
ggponti
+1  A: 

For Windows Vista

Sql Server 2005

Delete this file .. or open it with the Notepad and clear the server names that you want Clear from the history

C:\Users[User Name]\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat

Mido-Egypt
+2  A: 

File SqlStudio.bin actually contains binary serialized data of type "Microsoft.SqlServer.Management.UserSettings.SqlStudio".

Using BinaryFormatter class you can write simple .NET application in order to edit file content.

Tomas

related questions