Thursday, April 03, 2008

SQL Server Management Studio Tip

Recently, Sara Ford outlined a tip on her blog about a registry hack that enables vertical column guides within the Visual Studio Editors. This is one feature that my favorite text editor (Notepad++) has had for a long time and something that I have missed when working within Visual Studio.

After using this for a few hours in both Visual Studio 2005 and 2008 and then using SQL Server Management Studio (SSMS), I wondered if it would be possible to enable this option for SSMS's editor(s)?

After digging through the registry, I found a registry path the looked an awful lot like the Visual Studio path. I closed down SSMS, added the proper registry key, and then opened SSMS, and...

Presto! I now have the vertical column guides! Here are the instructions...

WARNING: This tip modifies your registry. Please ensure that you have a backup before proceeding in the event that Murphy's law kicks in!
  1. Open the Registry Editor
  2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell\TextEditor
  3. Add a new String value named "Guides"
  4. Set the value to "RGB(r,g,b),c1,...,c13" using the format described in Sara's blog.
Enjoy!