views:

693

answers:

2

I connect to a lot of different servers in SQL Management Studio, but I find that not only is there no way to delete the old connections (dbnames, usernames, etc.), they also start to show up as duplicates.

Is there any way to clear them/reorder the history? I can't seem to find any easy way.

Thanks! Chris

A: 

Have a look at the DialogSettings.xml and mru.dat files in your %AppData%\Microsoft\Microsoft SQL Server\90\Tools\ShellSEM directory. I haven't tried tinkering with mine yet, but they look like they've got the relevant information in.

I suggest you back them up first though!

Jon Skeet
I think you can leave out "Roaming" in "%AppData%\Roaming\Microsoft..." so it would be "%AppData%\Microsoft..."; At least in Vista.
Sung Meister
Ironically, I didn't realise that "%AppData%" would actually work directly - it was meant to be a sort of "meta replacement" - for instance, my directory is c:\Users\Jon\AppData\Roaming. Thanks for the hint though - will edit.
Jon Skeet
Doesn't work for 2K8, that might be a 2K5 thing.
Chris
Chris, are you still working on this? I've got a new netbook which I wouldn't mind install SQL Server Express 2008 (+studio) on, if you'd like me to investigate further.
Jon Skeet
Yes. I searched the registry and everything under SQL Server for a mention of my server's name and didn't find it, so now I'm thinking it's in profile now...but yes, if you find anything else that would be great.
Chris
+1  A: 

I don't see an accepted answer, so I'll add my 2 cents. I had the same issue and found the file in question is SqlStudio.bin. I'm not sure how you'd go about editing it, but if you re/move it, you get a blank slate for your SQL connections.

We still use XP here at work, so the file is located in the C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell folder.

jesus.tesh
While this doesn't really let you tinker with the usernames, once you reset the file the passwords get memorized correctly. Thanks!
Chris
In Windows 7: C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell
Chris

related questions