When connecting to database server using SQL Server Management Studio, all the connections with it's details are rememebered in history.

This can be problem in situations when you would like to clear that history because:

  • security issue (username and passowrd stays remembered)
  • lots of one-time connections are making a mess
  • or you simply want to make anonymouse connections


THE SOLUTIONS for this problem are following based on OS and SQL version you are using.

NOTE: before deleteing or modifying file, it's necessary to exit SSMS (SQL Server Management Studio)!!!
If you do not exit before delete-ing the file, even after deletion of the file, SSMS will again write into file on exit.

Windows 7

For SQL 2008 delete the file:
C:\Users\<USER>\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin

Windows XP

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


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



Hope those tips will help you to make your connection history safe! ;)