I hate the way SSMS tabs look by default.  Check this out:

SSMS Tab Defaults

SSMS Tab Defaults

That’s nearly useless.  The tabs are wide, but they still don’t show useful information.  Even worse, I’ve got more tabs than I can fit in the window, so the rest hang out in a meaningless dropdown.

To fix it, click Tools, Options,and go into Text Editor, Editor Tab and Status Bar.  Check out the Tab Text options:

Tools, Options

Tools, Options

You can uncheck the database name, login name, and server name because those are shown in the status bar anyway.  Then, if you wanna get fancy, change the status bar location to Top – it’s right above the Tab Text options.  Voila:

SSMS Tabs Fixed

SSMS Tabs Fixed

When I’m working, I save my queries in c:\temp with a short descriptive name.  If I’m performance tuning, I’ll save them as Before.sql and After.sql, or maybe Index1.sql and Index2.sql.  Presto, I can easily switch tabs without playing the guessing game.

Brent Ozar
I make Microsoft SQL Server faster and more reliable. I love teaching, travel, and laughing.

I’m mostly a figurehead here at Brent Ozar Unlimited. My true skills are menu advice, interpretive dance, and reading Wikipedia.
Brent Ozar on sabtwitterBrent Ozar on sablinkedinBrent Ozar on sabinstagramBrent Ozar on sabgoogleBrent Ozar on sabfacebook
↑ Back to top
  1. Hi Brent

    What would be great is a way to write a macro which would detect when the currently active database or server is on a predefined list – and if it is, change the background color of the query window. That’d be great as a warning that you are on a production database for example.

  2. Thank you. I’ve always hated the way tabs worked and this looks much better.

  3. Amazing. Maybe you should rebrand yourself as a SQL decorator?

  4. best damn tip evah!!

  5. Awesome!

  6. Awesome tip, thanks!

  7. Seems not to be available for sql server management studeio for sql server 2005 but still a nice tip.

    • Ramon – yeah, you should be on the latest version of SSMS at all times even if you’re connecting to SQL Server 2005. SSMS 2008 R2 has a lot of nice improvements like this.

      • Except that the SMS 2008 activity monitor doesn’t work against SQL 2000 servers (plus, I don’t think its as useful as the SQL 2005 activity monitor). If someone made a “classic activity monitor” plugin for SMS 2008, I’d be all over it!

  8. Thanks, great tip, I’ve been always bothered by the tabs!!

  9. You put your taskbar at the top too!!! How weird!

    I did not know that you could remove the database name from the tab, or that other stuff too. Now I do.

    • Task bar on the top very handy. All controls in the same place, don’t need to move move though whole screen to manage windows.

  10. Thanks Brent – didn’t know I had a problem until you came up with this solution.

    I like the staus bar at the top too, very neat.

  11. Thanks for the tip. I’ve always had a problem finding the tab I needed. I didn’t think to look for a solution.

  12. This is money. Feelin’ kinda stupid now for not digging deep enough to find this. Thanks man!

  13. Never dawned on me that you could tweak the UI this way, although it did annoy me that the text in the tabs is useless.

    Now if I can find a better way to manage my script library. I would like to create several “Queries” folders to categorize my scripts, but SSMS doesn’t allow that (at least not that I have found). 🙂

    Thanks for the tip!

  14. Thanks for the tip

    I’m surprised I never came across this tip before
    but now it’ll be set on every SSMS I came across

    Another good tip is to change the ALT+H keyboard shortcut to ALT+G for [Change Connection] in Query window

    Also, I use the SSMS Tools Pack to color-code Query window

    • Great tip, Brent…

      But I REALLY want to thank Jerry. It’s been driving me nuts that I didn’t have a shortcut to Change the Connection.

      Thanks a million!


  15. Cool tip Brent! I thought I had been through every knob and dial in SSMS, but I have never seen/used those options.

  16. Good suggestions.

    But, I’m not sure I’ll get into the habit of saving all the scripts into files.

    I’d much rather have the option of dynamically entering the tab text and/or highlighting part of the script (the key statement or part of a comment) and in the context menu (right-click) having a “Label Tab” option (or something like that) to change to tab text to that string.

    • Gil – that’s a great idea. Have you entered that at Connect?

      • Thanks, Brent.

        I haven’t, but with your encouragement I went over there and found this entry:

        Seems like changing the tab labeling would requiring overriding the default visual studio behavior, and they don’t seem to want to (as of a month ago). Somebody else suggested more flexible tab labeling in the comments there.

        I doubt I could get them to reconsider, but perhaps you could…

  17. Bingo 🙂 I’ve finally got the jump on you! …but probably not the reach hehe. I would say great minds and all that malarky, but I’ve still got work to do to get there.

  18. Thanks for a great tip, Brent. It’s probably worth mentioning for the uninitiated that you have to restart Studio before Options changes take effect. (They should add an option to change that!)

  19. You are my hero. Seriously great tip.

  20. This is a great Tip but if you look at

    you will see that Jonathan Kahayias actually blogged about this back in July 2008

    Another example of “great minds think alike”

  21. Really nice tip.

  22. Really nice tip! Sadly, I’m stuck with SMSS 2005 for the moment. Anyone knows if it’s be possible to do this via registry?

    Another thing. I actually came here looking for a way to change the way new tabs are created in SMSS: They appear at the left, pushing all existing tabs to the right, which I find immensely annoying. I think they should appear to the right, just like any browser. Is this possible?

  23. This has been a helpful tip. Do you have an update for SSMS 2012?

  24. In ssms2012 unchecking the server name results in the ssms crash. (Each time when query is opened and closed without any save/execute action in between).

  25. Sadly, I can’t get rid of the leading server name when designing views in SSMS 2008 R2, despite unticking this option. Go Microsoft. Oh well, at least I can now see more info on the right hand side – so now it’s only half useless.

    I still think SQL 2000 had the best UI – that just worked. Good luck trying to find deadlocks in current versions.

  26. Brent,
    Very practical and useful tip. Also your bolg post gets lots of good responses and I learn from them as well. Thanks everybody for sharing your ideas.

  27. This is nice tip, i didn’t look this option till now. Actually this helped in different way in my case though. I just displayed only file name and server name on tab, that way i could see server name always.

    Thank you.

  28. so I stumbled into a related shortcut today… I’ve been using the “Windows…” command in my toolbar for quite a while, but it still doesn’t quite mimic the window list that the old Query Manager had. I’m not sure if it’s much better, but when I added the “File List” command to my toolbar, A) it is displayed with the name “Show EzMDI File List”.. and B) it shows a hotkey shortcut of CTRL + ALT + Down Arrow.

    So did everyone else already know about the CTRL+ALT+Down thing? The fact that the list always shows up in the upper-right is a bit annoying, but it’s easier to read than the tabs! Just press that, then the down arrow a few times to select one, then enter. bam! 13 years later and we’re almost back to year-2000 usability. Now if we can only get a useful version of the Activity Monitor 😉

  29. Hi Brent,

    Thanks for this tip.

    Just want to throw an issue to see whether you have any ideas.
    Is there a way to have a convenient hot key combination for comment/un comment.

    I was used to,
    CTRL+SHIFT+C – Comment out code.
    CTRL+SHIFT+R – Remove comments (UNCOMMENT)
    combination in SQL Server 2000.

    The current combination of
    CTRL+K, CTRL+C /CTRL+K, CTRL+U need two key presses and inconvenient.



    • Hey Sena,

      I actually like the current shortcuts for this! I find it easy ever since I learned a mneumonic device for it from Merrill Aldrich (

      Control Kansas + City

      And then the “U” the other way is almost like “undo”. For some reason this really made it easy for me. It’s definitely an american version but I bet there’s a different city name to localize it for other parts of the world.

      Just a simple idea. 🙂


  30. Thanks for the tip. Very useful. I wish I had googled for this much earlier!

  31. I would really like the tab name to be the first x number of characters of the first line of the query. I normallyy put a short comment / description there and I don’t want to save all my queries

  32. Seriously love this. Thank you so much!

  33. Pingback: Configuring SSMS | SQL Notes From The Underground

  34. Great tip !!!
    Is there a way to also apply these settings to the Query Designer windows?

    For example, when you right-click on a table name, and pick “Edit Top 200 Rows”.
    The window that comes up (which I believe it’s referred to as the “Query Designer” window), does not see to pick up these settings.

    Thank you very much.

  35. Thanks for the nice tip.
    How can I change the default master db to user db for every new tab??

  36. you are a saint

  37. Great collection of tips; just what I was looking for.

Leave a Reply

Your email address will not be published. Required fields are marked *