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:

While exploring the new version, I just noticed this setting in the 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:
![]()
…and in green:
![]()
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.



August 12, 2008 at 10:16 pm
U da man.
August 12, 2008 at 10:20 pm
Hehe, Mark
August 12, 2008 at 11:46 pm
Nice find and humor
August 13, 2008 at 11:42 pm
What would be really cool is if the window tabs changed colour too…
August 14, 2008 at 9:29 am
[...] 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. [...]
August 15, 2008 at 2:32 pm
@jason:
@Dave: indeed.
August 16, 2008 at 10:47 pm
[...] 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. [...]
October 5, 2008 at 3:15 am
[...] 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/ [...]
October 13, 2008 at 11:39 am
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
October 13, 2008 at 11:42 am
@klaus: Good question. Maybe it is planned for the next release