I know it sounds weird, but while researching this issue I discovered a bug in SSMS that causes the context menu to change (including not having backup/restore options) based simply on the database name. Using (var fs = settingsFile.Open(FileMode.For me the problem was the database name, of all things. If (conn.UserName = "adminUserThatShouldBeRemoved") ServerConnectionSettings removeConn = null Will store the connection for the provided server which should be removed Var serverTypes = įoreach (var server in ) through multiple nested collections to find the connection to be removed. The structure of server types / servers / connections requires us to loop Settings = (SqlStudio)fmt.Deserialize(fs) Using(var fs = settingsFile.Open(FileMode.Open)) Backup our original file just in case.įile.Copy(settingsFile.FullName, settingsFile.FullName + ".backup") īinaryFormatter fmt = new BinaryFormatter() Var settingsFile = new Server Management Studio\13.0\SqlStudio.bin") Net 4.6.1 console application and added a reference to the namespace which is located in the following dll: C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\.dll (your path may differ slightly depending on SSMS version)įrom there I could easily create and modify the settings as desired: using System.IO To accomplish removal of the specific login, I created a new C#. NET binary serialization of the .SqlStudio class, which can be deserialized, modified and reserialized to modify specific settings. It turns out the SqlStudio.bin file others are discussing here is a. In my scenario I only wanted to remove a specific username/password from the list which had many other saved connections I didn't want to forget. Original source from which mentioned that this feature is available since 2012! You can simply press delete from the Server / User name drop down (confirmed to be working for SSMS v18.0). You need to show hidden folders in explorer. These are profile paths for Vista / 7 / 8.
SQL Server Management Studio 2005 delete the file – same as above answer but the Vista path.Ĭ:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat SQL Server Management Studio 2008 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin SQL Server Management Studio 2012 delete the fileĬ:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\SqlStudio.bin SQL Server Management Studio 2014 delete the fileĬ:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\12.0\SqlStudio.bin SQL Server Management Studio 2016 delete the fileĬ:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\13.0\SqlStudio.bin SQL Server Management Studio 2017 delete the fileĬ:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\14.0\SqlStudio.bin Just confirmed this delete in MRU list works fine in 20.
#ADD TASK LIST IN SQL SERVER MANAGEMENT STUDIO 17 HOW TO#
Another answer here also mentions since 2012 you can remove Remove cached login via How to remove cached server names from the Connect to Server dialog?.