views:

328

answers:

3

I've connected to a few databases once and only once and will never need to again, however they clutter up the dropdown of logins available to select.

How can I reset the lists of servers and logins from the connection prompt in SQL Server Management Studio Express 2008?

+1  A: 

You can very carefully delete (or - even better - rename) the file mru.dat in:

%home%\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\

NOTE: my version il 2005, so you might find your path is slightly different.

Manrico Corazzi
hmm, 2008 on vista I look here: C:\Users\[username]\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell but can find no mru.dat
DannyT
@ DannyT seen The Lazy DBA's answer below? the file to look for (2k8 on Vista) is SqlStudio.bin
Izmoto
A: 

Vista user can update the DialogSettings.xml. This file can avilable in the following location

C:\Users[UserName]\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\Shell

Kthevar
unfortunately I have no such file in the 2008 version:C:\Users[UserName]\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell
DannyT
A: 

For SQL Server Management Studio 2008, this data is apparently stored in...

%SYSTEMDRIVE%\Documents and Settings\%USERNAME%\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin

Be advised that this is a binary file. These values are associated with an object named Microsoft.SqlServer.Management.UserSettings.ServerConnectionSettings, which is some sort of managed collection object.

That's where they live. I'd modify this file at your own peril, and make a backup of it just in case. :)

The Lazy DBA