SQL SERVER – 2008 – Change Color of Status Bar of SSMS Query Editor

This is one very interesting issue which I have started to follow recently. Just like any other organization my company has many servers. Some are production and some are development. It is very much necessary that query which are written for developer environment does not run for production environment accidentally.

In SQL Server 2008 there is special feature which can change the color of the task bar. This will alert developer to run query on server.

Let us see quick tutorial with images which explains how the color of the status bar in SQL Server management studio can be changed.

Another example of different color status bar.

Reference : Pinal Dave (http://blog.SQLAuthority.com)

16 thoughts on “SQL SERVER – 2008 – Change Color of Status Bar of SSMS Query Editor

      • I make a table where i using salary column ..in which i put some value but actually i want to make color of some value which is within 5000 to 7000 and when i should retrieve that table on gridview control of asp.net it will be show that value with that color …. i don’t know how to make it ..if u have some idea than could u please tell me…. help me sir m dying to know about this ……


  1. I believe it works for Central Management Servers group as well
    so a Production group can be RED while Development group can be GREEN

    It’ll be PINK if you try to run multi-server script

    Sometimes I find it doesn’t store the colour settings all the time…. didn’t bother to figure out why


  2. hello

    I want to change the color in results when we select some data tha use case by this we got some filter data which i want to chage color .

    how can we did in sql 2005


  3. Pingback: SQL SERVER – Find Hostname and Current Logged In User Name Journey to SQL Authority with Pinal Dave

  4. I believe this could be a great feature, if not for a glaring bug, reported here:


    If you have a query window open under a certain connection, then change that windows connection (i.e. right click, disconnect, connect), then the color from the first connection will remain in the status bar.

    Anyone that cares enough about the proper implementation of what could be a great and helpful feature should consider going to this website and voting “Yes” to bump up its priority.


  5. Any idea if there is a way to resize the items in the status bar? The reason I ask is because my login is always too long and I need to mouse over it to see my SPID (a real pain!).


  6. Thanks Pinal Dave! I am using this in SSMS R2 and it works perfectly when I right click and select change connection and if I connect via the upper left connect drop down. This is VERY useful. Production bar is red for me, my localhost server is green, and I have a key to the other server’s colors posted on my wall until I learn them.


  7. Pingback: SQL SERVER – Weekly Series – Memory Lane – #010 « SQL Server Journey with SQL Authority

  8. Pingback: SQL SERVER – How to Hide Yourself from SQL Server? – Guest Post by Balmukund Lakhani « SQL Server Journey with SQL Authority

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s