views:

523

answers:

2

I recently upgraded to SQL Management Studio 2008 (full not express, if it matters).

In 2005, when I was in the Query Editor, each tab (with an unsaved query) would have the servername-instance-query name or something like that, but all I cared about was seeing the server name there so I knew which server I was running my query on.

In 2008 it appears that they've decided to change the tab title to query name-servername, and the result of this is I can't see what server I'm working on without hovering over the tab and looking at the tooltip thing that pops up, which really slows me down. So currently all my tabs are titled something like "SQLQuery5.sql..." which is useless to me.

How can I get the servername back to the front the tab title?

+1  A: 

If you have the SQL Editor menu checked up top then there is a drop down that tells you exactly what database you're in for the currently selected tab.

Chris Lively
The problem is the database name is the same across my servers (development, production etc), so that never changes. This is why I need the actual Server Name in the title of the tab (like it was in 2005)
Albert
Albert, maybe take a look at the "Use custom color" option which will paint the status bar a different color for each connection (e.g. paint production red, qa green, etc). Right-click a registered server, select Properties, go to the Connection Properties tab, and check "Use custom color:" and then Select... It's not in the tab but might be a helpful visual cue nonetheless.
Aaron Bertrand
awesome tip, thanks Aaron!
Albert
+2  A: 

It can be turned off/on in SSMS 2005, so possibly in 2008 you have it switched off.

Go to Tools -> Options -> Text Editor -> Editor Tab and Status Bar. Under "Tab Text" in the right hand panel, make sure "Include server name" is set to True.

AdaTheDev
that's actually very helpful, thanks. I'd still prefer to have the servername first, THEN the query name, but it appears like there isn't a way to alter the ordering of the data elements. I was able to turn off enough stuff to see the servername, so that works.
Albert
The default is true. However, even the shortest server names are truncated in the tab name.
Chris Lively
I asked for better customization of tab display: https://connect.microsoft.com/SQLServer/feedback/details/264445/ssms-allow-us-to-customize-tabs-and-tooltips and related: http://connect.microsoft.com/SQLServer/feedback/details/472800/ssms-more-flexible-tab-display
Aaron Bertrand