Colored Status Bar in SQL Server Management Studio

Last time, I showed you how to add line numbers to management studio. Today, I’d like to share another useful tip for distinguishing different servers and environments.

Usually, you have multiple environments with the same database. For example, we have development, UAT and production ones. When you need to operate on all of them at the same time, it is a good idea to have some kind of visual help on which one you run a current script.

For this reason, you can use colors in the query editor status bar.

  1. When connecting to the server, press Options.
  2. In Connection Properties tab, check Use Custom Color
  3. Select a color of your choice.

Enable custom colored status bar for Query Editor

Personally, I use green for development, orange for UAT and red for production environment. Also, you can customize the status bar in multiple ways. For instance, you can move it to the top of the window, but I’m fine just with the colors.

Custom colored status bar for Query Editor

To sum up, visual indication where you run your queries can save you from costly errors like running an unintended delete statement on production environment instead of the development one.

Also, SQL management studio remembers the settings for your connections, so if work with databases often I recommend to use it.

Would you like to get the most interesting content about C# every Monday?
Sign up to C# Digest and stay up to date!