SQL Server Management Studio, also known simply as SSMS, has many options that can be customized to help you get work done. In this post I will cover three such options that I have found useful.
The first option discussed will be line numbers. Line numbers can be added to the query editor window to help identify sections of code. To do this click the Tools menu. In the drop down then select Options. Then under Text Editor left click Transact SQL. Now several options will be available related to what happens inside the text editor screen. Left click the box next to Line Numbers to enable the display of line numbers next to your code in the editor.
The second option is query shortcuts. Ever find yourself retyping commands like sp_who2, sp_helpindex from Kimberly Tripp or other handy procedures? You can actually execute these by assigning them to a keyboard shortcut rather than having to type them each time you want to run the procedure.
To do this, go back to the Tools and Options menu. Choose Environment, then Keyboard, then Query Shortcuts. The left column will be labeled Shortcuts. To the right of the shortcut you wish to use simlpy left click and type the command you want to assign. Then click OK to assign that shortcut. Presto! Now the next time you want to run that favorite metadata proc, just use the assigned shortcut.
The third option is one of my favorite options to adjust. It is the number of recent files and projects that SSMS displays. This list gives you access to recently opened files and projects. The default is 10 but I don’t always find that 10 is enough for me. To adjust this, go to Tools, then Options and Environment. In the Recent Files section, the number can be adjusted up or down to suit your preference.