We all probably use SQL Server Management Studio (SSMS) on a very frequent basis. Just for giggles, lets just say that means we use it at least once a day. I think it is safe to say, we have all been wanting to see something cool released for SSMS for a very long time.
That is probably one of the big reasons for various other third party offerings and people bouncing from IDE to IDE or Management Tool to Management Tool. They just weren’t getting what they really wanted out of SSMS.
A couple of months ago, while sitting in a session about Service Broker, I saw the weirdest thing in the SSMS interface and was awe struck. Quickly I turned to my trusty magic blue box to google what it was that I was seeing. It turns out I had been living under a rock apparently because this was not a new feature. Rather, it had been out for multiple releases (at that time) of SSMS.
What was that gob smacking feature that I saw? That feature was (and still is) the scrollbar map. What is the scrollbar map, you ask? I will share that with you!
The scrollbar map is this neat little replacement for the traditional scrollbar. The map gives a miniature code map in place of the scrollbar so you can quickly see the rough gist of your code in the scrollbar. Here is what it looks like.
In the preceding image, I have a segment of code active on my screen in SSMS. On the right of that, in place of the traditional scrollbar, I see a representation of the entire script in super tiny print. The active portion of my script is “highlighted” by a box on the map. Just like any scrollbar, I can slide it to any point in the script easily – or I can click on a spot in the map and be moved to that spot in the script.
So, when did this feature come about? After-all, It seemed brand new to me back in the beginning of November and many have said it was a part of SSMS 17.3. The scrollbar map has actually been around since SSMS 16.
Accessing and setting up the map is pretty easy. You can either right click the scrollbar and select “scrollbar options” or you can navigate the tools menu to options and follow the tree like shown in the preceding image. In the preceding image, I am showing my current configuration for the map. These are my preferences and I do recommend that both be enabled. That said, the choice is yours.
The second option: “Show Preview Tooltip” will look something like this.
In this image, I have my mouse hovering over a segment of code in the map. As I hover, a little preview box pops up to the left of the map (outlined in a red box in my image).
Enabling the scrollbar map has saved me oodles of time – even without the preview option enabled. I can much more quickly hop to different segments of code with this feature than I could if trying to scroll up and down trying to find that one little section I need.
Try it out. Play with the map. I think if you spend a lot of time bouncing around in TSQL scripts, you will find that this feature can and will save you time too.