SQL Server Management Studio Scroll Bar Enhancements

There are so many tools within SQL Server Management Studio (SSMS) that can make your job as a DBA or Developer easier that you may or may not be using.  One of the tools available is the customization of the Scroll Bar.  You can change the display and the behavior of the scroll bars, which can make working with code a lot easier and more efficient, especially when working with long code.  The two options we will discuss are Scroll Bar Display and Behavior.

To change the settings, go to:

Tools > Options > Text Editor > All Languages > Scroll Bars



The annotations show on the right and left hand vertical bar no matter if you are in bar mode (default) or map mode.  When disable ‘Show annotations over vertical scroll bar’, you will not see any of the marks on the right scroll bar.  If this is disabled and Behavior is set to bar mode, you will have a grey scroll bar on the right side, no marks at all.  With Show Annotations enabled, there are four options that you can toggle on or off; changes, marks, errors, and position.


Show changes

This does just what you would think by the title.  It shows the changes that have been made in your code.  All saved changes are shown in green, unsaved changes are shown in yellow.



Show marks

Marks are breakpoints and bookmarks set in your code.  Breakpoints are shown in maroon and bookmarks are black.



Show errors

Syntax errors are easily identified with a quick glance down the right side.  All syntax errors in the code appear in red.



Show caret position

Shows as a blue line across the right vertical bar indicating your current position.




There are two options for the scroll bar behavior, bar mode and map mode.  The default setting is ‘Use bar mode for vertical scroll bar’ and probably what most of us are used to seeing when we open a query window.  Changing from the bar mode to the map mode is a great option if you are working with long code.

Bar Mode (Default)



Map Mode


The map mode gives you a compressed view of the code along the right hand side to use a map making it easier to maneuver.  There are four options for map mode; Off, Narrow, Medium, and Wide.  Setting the Map Mode to Off gives you the same display option as Bar Mode.  The map will help you move through your code more easily.  Clicking on a specific spot on the compressed view, you will move to that section of the code in the query window.



Scroll your mouse along the code on the right to see the code in that section.  This can make finding a specific piece of code a lot easier.