SQL Server v.Next (Denali) : Another SSMS bug that should be fixed

Sorry to call this out in a separate post (I talked about a bunch of SSMS Connect items the other day), but Aaron Nelson (blog | twitter) jogged my memory today about an issue that has gone unfixed for years: the custom coloring for Registered Servers is neither consistent nor global.

For one of my servers, I've chosen a red color to show in the status bar.  Let's pretend this is a production server, and I want the red to remind me to use caution.  I can set this up by right-clicking a Registered Server, choosing Properties, and moving to the Connection Properties tab:


Once I save, a new query window – when launched by right-clicking the Registered Server and choosing New Query – looks like this:


This is a great feature, if only it worked all the time. 

For example, if I right-click within the above query window and choose Connection > Change Connection, and switch to a server that doesn't use a custom color (or uses a different color), the status bar stays red.  More importantly, if I'm in a query editor for a connection without a custom color, and I switch the connection to my production server, the color does not change to red.

Similarly, if I open a new instance of SSMS and click on New Query (or am prompted because my Startup option includes new query window), the status bar remains the default yellowish color, not red.

These gaps in functionality defeat the purpose of the visual cue, and I am hoping that a fix can be addressed in the Denali timeframe.  I wanted to call this one out separately because it can lead to pretty serious errors.

There are two Connect items about this issue; one has been closed as "Won't Fix" and the other (which came earlier!) has yet to see a response from Microsoft.  I'm hoping that with enough steam we can change that: please vote and comment!

Connect #533667 : SSMS Connection Colouring Not Implemented Sensibly

Connect #504418 : [SSMS] Make color coding of query windows work all the time

There are workarounds, of course: always use Registered Servers to launch your query windows, use Mladen's free SSMS Tools Pack, be a lot more careful, etc. etc.  But personally I feel that such a useful built-in feature should be rectified to function reliably.


Aaron Bertrand

I am a passionate technologist with industry experience dating back to Classic ASP and SQL Server 6.5. I am a long-time Microsoft MVP, write at Simple Talk, SQLPerformance, and MSSQLTips, and have had the honor of speaking at more conferences than I can remember. In non-tech life, I am a father of two, a huge hockey and football fan, and my pronouns are he/him. If I've helped you out, consider thanking me with a coffee. :-)

10 Responses

  1. WayneS says:

    When you "Change Connection", or click "Connect" in the Object Explorer, you need to click "Options" and set the custom color there also. There are two different places that it needs to be set, but they ought to be integrated to work together.

  2. Dylan says:

    And please roll color coding into CMS so I can color code all the servers and have everyone in the DBA team on the same page!

  3. unclebiguns says:

    Another bug in this functionality is that when you right-click an existing stored procedure and select modify you don't get color-coding.  You do get the color-coding if you do Script -> New Query Editor Window.  I'm using the 2008 tools, not 2008 R2, so maybe it has been corrected in R2.  

  4. Mladen Prajdic says:

    On more reason to install my SSMS Tools Pack 🙂

  5. Ryan Adams says:

    For those of us that work in multiple environments all day long (dev/test/production) I agree this is a major annoyance that can lead to code being run on the wrong servers.
    I voted!

  6. mjswart says:

    No problem, my frustration lies entirely at Redmond.
    But let me plug an article I wrote about that frustration: http://michaeljswart.com/?p=809

  7. AaronBertrand says:

    Michael, sorry I missed yours!  It didn't show up in the two searches I tried.

  8. mjswart says:

    And those are very very similar to mine from August 2008. I even uploaded a wmv file describing the issue. Extra votes on this one are welcome too!

  9. Peter Schott says:

    SSMS Tools is definitely better. One of the first things I noticed post-install was that the color-coding worked properly. As for the Connect tickets, I wish I could say that I was surprised by the "won't fix" response.  I think I saw the same thing for the "Remember me" functionality which also doesn't work consistently. Save user/password and at some random point that password disappears. I can reproduce it over time, but can't figure out why that happens. Submitted to Connect and it's a "won't fix" resolution. 😛

  10. jamiet says:

    The epitome of a half-finished feature!