SQL Server 2008 Management Studio tip: Status bar Custom Colors

Here is a handy tip for those of you who work often with multiple SQL Server instances: Custom Colors for the connection status bar.

You have probably noticed the new status bar at the bottom of the Query windows in the new SSMS:

Khaki Status Bar

While exploring the new version, I just noticed this setting in the Connection Properties:

Sql2008 Mgmt Studio Connection Properties

Checking the box allows you to pick any color from a standard color –dialog after clicking the Select… –button.

Here is the status bar in red:

Red Status Bar

…and in green:

Green Status Bar

So what?

Now you are probably thinking: “Neat, but not a big deal. So the color can be changed. Whee! What does this guy want for this discovery? A medal? Front paged in DotNetKicks, Digg and Techmeme? 5000 2000 followers in Twitter and FriendFeed? Interview from the Louis Gray?”

Actually the point of this blog post was to tell how this feature could be used for avoiding human errors during daily administration & development.

If you are like me, you often have multiple connections open for several servers and you have to be careful to make sure you are working on the right one. Color coding the connections could help to avoid - possibly serious - mistakes.

For example, you could dedicate:

  • Green for development servers
  • Yellow for test servers
  • Red for production servers

This way you are more likely warned before accidentally executing that TRUNCATE TABLE on a production server instead of the test server you meant to…

Great thing about this feature is that SQL Server remembers your preferences per server, so you need to define the colors only once.

10 Responses to “SQL Server 2008 Management Studio tip: Status bar Custom Colors”

  1. Mark Wisecarver Says:

    U da man. ;-)

  2. jemm Says:

    Hehe, Mark ;)

  3. Jason Says:

    Nice find and humor :)

  4. Dave Says:

    What would be really cool is if the window tabs changed colour too…

  5. Reflective Perspective - Chris Alcock » The Morning Brew #158 Says:

    [...] SQL Server 2008 Management Studio tip: Status bar Custom Colors - One of the nice new features in SQL server Management Studio 2008, anything that helps avoid those awful ‘I’ve just run that on the wrong database’ moments has to be a good thing. [...]

  6. jemm Says:

    @jason: :)

    @Dave: indeed.

  7. Dan's Blog : Exploring New Releases Says:

    [...] The first one by Paul Nielsen shows a few shortcut keys for IntelliSense in SSMS. The second one by Joni Moilanen (or Jemm) is on setting the status bar color in the T-SQL query editor in SSMS. [...]

  8. SQL Server 2008 Jumpstart and other resources « belle’s sql musings Says:

    [...] The SQL Server 2008 Status Bar Custom Colors (why it’s not trivial!) http://blog.jemm.net/2008/08/12/sql-server-2008-management-studio-tip-status-bar-custom-colors/ [...]

  9. klaus Says:

    Hi

    really helpful, but why on earth is the statusbar for a table opened for manual editing is not treated the same way?

    Regards
    klaus

  10. jemm Says:

    @klaus: Good question. Maybe it is planned for the next release ;)

Leave a Reply