Subscribe | Alerts via Email
View All Quotes
“When I am working on a problem I never thing about the beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong.”
-R. Buckminster Fuller
<July 2010>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

©2010 Cal Zant
Sign In
Total Posts: 106
This Year: 5
This Month: 1
This Week: 0
Comments: 2

For those of us who might execute queries on the live/production SQL Server from time to time, it is important that we are constantly aware of whether we are about to execute a query in the context of the test or live environment.  Most the time I like to perfect a script in the test environment, and then change the connection to the live environment ... but even then a visual cue that would help me differentiate which one I am currently connected to would be a welcomed feature and might make me double-check that DELETE statement I am about to run to make sure it has a WHERE clause on it.

Luckily, this feature is built into SQL Management Studio 2008.  Turns out it is right in front of your face, but I didn't ever notice it until I actually heard someone mention it and I went digging for it.  When you connect to a server, there are several options under the "Connection Properties" tab.  The bottom one is a checkbox for Use Custom Color.  Here is the MSDN's documentation for that property: "Select to specify the background color for the status bar in a Database Engine Query Editor window.  To specify the color, click Select. In the Color dialog box, select a predefined color from the Basic Colors grid or click Define Custom Colors to define and use a custom color."

Test/Development Environment - Lower contrast green to indicate everything is cool

Configure status bar color in SQL Management Studio based on connection

Dev environment status bar color example

Live/Production Environment - Dark red that would be hard to miss

Configure status bar color in SQL Management Studio based on connection

Production environment status bar color example
Thursday, April 09, 2009 2:20:02 PM (Central Standard Time, UTC-06:00)  #