I hate the way SSMS tabs look by default. Check this out:
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:
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:
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.




Rich June 7, 2011 | 8:40 am
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.
Brent Ozar June 7, 2011 | 8:42 am
Actually, you can do that in two different ways – with the Central Management Server’s list of servers, or with the free SSMS Tools Pack:
http://www.brentozar.com/archive/2008/08/sql-server-2008s-new-central-management-server/ – the CMS lets you set tab colors by server, and the CMS list is shared with all your users (as long as they’re using Windows auth)
http://www.ssmstoolspack.com/
Chris Shaffer June 13, 2011 | 7:55 am
Another option for colors is when you are logging in to the server, hit the “Options >>” button on the bottom right, go to “Connection Properties” tab and check “Use custom color”. Select a color. Now when you connect, the status bar (the one you just moved to the top of the editor
) will be that color.
This setting is associated to the server you are connecting to, so it’ll remember the color next time you log in, and if you have different tabs open connected to different servers, the status bar will be the correct color on each of your tabs.
Jorge Segarra November 16, 2012 | 12:33 pm
I actually blogged all about how to do that using the tools/methods Brent described http://sqlchicken.com/2012/06/m3-connecting-to-wrong-environments/
Mike June 7, 2011 | 8:49 am
Thank you. I’ve always hated the way tabs worked and this looks much better.
Claire June 7, 2011 | 8:51 am
Amazing. Maybe you should rebrand yourself as a SQL decorator?
AndyG (@DBA_ANDY) June 7, 2011 | 9:14 am
Extreme SQL Makeover!
Paul Hunter June 7, 2011 | 8:55 am
best damn tip evah!!
Thirster42 June 7, 2011 | 9:49 am
Awesome!
Shawn Johnson June 7, 2011 | 9:49 am
Awesome tip, thanks!
Ramon Smits June 7, 2011 | 10:08 am
Seems not to be available for sql server management studeio for sql server 2005 but still a nice tip.
Brent Ozar June 7, 2011 | 10:10 am
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.
Brad Corbin June 7, 2011 | 10:33 am
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!
Jason Yousef June 7, 2011 | 11:39 am
Thanks, great tip, I’ve been always bothered by the tabs!!
@meltondba June 7, 2011 | 8:54 pm
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.
Thanks
Muthukkumaran kaliyamoorthy June 8, 2011 | 1:06 am
Thanks for the tip.bernt
Seth Lynch June 8, 2011 | 4:12 am
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.
Seth
Clint Davis June 8, 2011 | 6:34 am
Thanks for the tip. I’ve always had a problem finding the tab I needed. I didn’t think to look for a solution.
Shawn Quillman June 8, 2011 | 8:41 am
This is money. Feelin’ kinda stupid now for not digging deep enough to find this. Thanks man!
Jeffrey Langdon June 8, 2011 | 9:56 am
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!
Brent Ozar June 8, 2011 | 10:01 am
Jeffrey – you can use the Templates feature in SSMS. Tim’s blogged about that before:
http://www.mssqltips.com/tip.asp?tip=1465
The drawback is that you can’t save the templates on a network share, but Denali’s upcoming Snippets feature fixes that too.
Jeffrey Langdon June 8, 2011 | 10:10 am
Thanks. I’ll check it out. Typically I save my files to a thumb drive and not a network drive.
Maybe I am missing something since you obviously think not being able to save to a network drive is a short coming?
Could you elaborate?
Brent Ozar June 8, 2011 | 10:12 am
Yeah, when you’ve got multiple people in a shop (developers and DBAs) it’s much easier to have a centralized set of scripts that everyone can update seamlessly.
Jeffrey Langdon June 8, 2011 | 10:17 am
Duh! Yeah, that’s right, I forgot. I don’t share. Muuuwwaaahahahah! Kidding.
Actually, the DBA group does, but not with the Devs. LOL.
Jerry Hung June 8, 2011 | 1:35 pm
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
http://narfle.com/blog/2006/07/ssms-keyboard-shortcut-for-change.asp
Also, I use the SSMS Tools Pack to color-code Query window
Brad Schulz June 8, 2011 | 3:41 pm
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!
–Brad
DamonRipper June 9, 2011 | 9:44 am
Cool tip Brent! I thought I had been through every knob and dial in SSMS, but I have never seen/used those options.
Gil June 9, 2011 | 12:34 pm
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.
Brent Ozar June 10, 2011 | 8:14 am
Gil – that’s a great idea. Have you entered that at Connect?
Gil June 10, 2011 | 9:09 am
Thanks, Brent.
I haven’t, but with your encouragement I went over there and found this entry:
http://bit.ly/kT41qy
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…
Brent Ozar June 10, 2011 | 9:13 am
HA! You overestimate my abilities.
The best thing to do is just vote for that Connect request.
Mark Broadbent June 13, 2011 | 6:05 pm
Bingo
I’ve finally got the jump on you!
http://tenbulls.co.uk/2010/07/28/make-your-tabs-more-readable-in-ssms/ …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.
Brent Ozar June 13, 2011 | 7:10 pm
Mark – hahaha, nice work!
David Wimbush June 15, 2011 | 7:29 am
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!)
Brent Ozar June 15, 2011 | 7:41 am
David – thanks, but actually you don’t have to restart SSMS. Your changes take effect with each new opened tab.
David Wimbush June 17, 2011 | 12:56 am
Doh! Well that’s two things I’ve learned then. Thanks, Brent.
Greg Larsen September 13, 2011 | 9:27 am
You can also just change the connection (re-connect) for an existing tab and the label well change.
Dayton brown June 15, 2011 | 10:41 pm
You are my hero. Seriously great tip.
Patrick Flynn June 16, 2011 | 9:03 am
This is a great Tip but if you look at
http://jmkehayias.blogspot.com/2008/07/ssms-options-in-sql-2008.html
you will see that Jonathan Kahayias actually blogged about this back in July 2008
Another example of “great minds think alike”
Brent Ozar June 16, 2011 | 9:13 am
Yes, and if you look at Books Online, you will see that it came out even earlier.
Patrick Flynn June 16, 2011 | 9:27 am
Your version is however, easier to read than
http://msdn.microsoft.com/en-us/library/cc280602.aspx
and has probably been read by more people
Sunilk June 21, 2011 | 9:37 am
Really nice tip.
Leo Discua November 9, 2011 | 11:33 am
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?
Jorge Segarra November 16, 2012 | 12:38 pm
You can use an awesome (and free) plug-in like SSMS Tools Pack (http://ssmstoolspack.com) to do this behavior and thensome. Toolspack even color codes windows using regex based on server name if you’d like. Compatible with 2005+.
Martin Lundblad June 18, 2012 | 1:05 pm
This has been a helpful tip. Do you have an update for SSMS 2012?
Vladimir Smida July 14, 2012 | 5:00 am
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).
Saul October 18, 2012 | 6:17 pm
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.
Ameena November 16, 2012 | 1:11 pm
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.
Satheesh January 25, 2013 | 10:27 am
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.
Chris B May 13, 2013 | 5:37 pm
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