IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact
You are here: Home / Database / How to Use Custom Color in SSMS

How to Use Custom Color in SSMS

With many mistakes made by developers and DBAs alike firing a query in a wrong environment, there is one easy thing that can be done to alleviate this problem. That is by using the color coding on the status bar and you can set this up in the server registration on your SQL Server Management Studio (SSMS).

This feature is so easy to overlook because many people just don’t bother to look at the second tab when editing the Properties in Server Registration (in fact, quite a few people don’t bother to use Registered Servers at all to connect to the databases).

On the Registered Servers pane on SQL Management Studio, right-click on the server you want to assign a color and select Properties…

SSMS Registered Server Properties

Click on the Connection Properties tab and check on Use custom color:

SSMS Edit Server Registration Connection Properties

Here are the color schemes I use for the example. Feel free to use any colors that suit you.
Environment (RGB values)
DEV (102, 133, 46)
STAGING (128, 128, 0)
QA (255, 128, 0)
PROD (190, 0, 0)

Do these steps for all database servers you want to color code.

Here is the final result with all windows opened.
SSMS with custom colors on different environment

Caveats

  • You need to use the registered servers in order to use the custom color.
  • For some reason, the custom color settings is not exportable. So you have to take note of your color settings and repeat the steps for any other computers you use.
  • If you use Change Connection button, the color will stay the same as the last one you connected to from the registered servers, which can be dangerous. This can be remedied by using connection coloring in SSMS Tools Pack. This issue was fixed in Windows 8.1, however SSMS Tools Pack still gives a bit more flexibility to place the color bar on one of the four sides of SSMS query window. If you have access to Redgate SQL Prompt, this might be the best option, and you can read on how to do it here.

Further Reading

How to Use Custom Color in SSMS Using Redgate SQL Prompt
Using Connection Coloring in SSMS Tools Pack

March 3, 2014 Filed Under: Database Tagged With: SQL Server, SSMS

Comments

  1. Adam Plocher says

    August 7, 2014 at 6:44 pm

    This is a great feature – I’ve been using a similar feature in SQL Prompt for quite a while and never knew that it was actually built into SQL Manament Studio. The Redgate SQL Prompt version colors the tabs (which is a little bit nicer because you see which environment all your tabs are working against), but it’s not easy to configure the colors and you need a SQL Prompt license.

    My main question is: is there a way in SQL or even on a domain controller to somehow set a policy that says “this instance is this color” so EVERYONE (even certain… error prone co-workers…) will automatically get colorized?

    Reply
    • platt says

      August 8, 2014 at 12:44 pm

      Hi Adam,

      I don’t think it can be setup that easily across the board. However, if you’re an admin, a pre-configured RegSrvr.xml file can be set as part of an image for a new deployed PC.

      For existing users, there’s more work involved to locate this file usually in %USERPROFILE%\AppData\Roaming\Microsoft\Microsoft SQL Server\###\Tools\Shell folder (### being your SQL Server folder version number) and modify the parameters. Basically it’s doable with some scripting and file push over the network.

      I hope that answers your question.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • WordPress
  • Writing

Recent Posts

  • F#: Seq, List, Array, Map, Set. Which One to Use?
  • How to Get Table Definition in SQL Server
  • Why You Need to Use a VPN
  • How to Use Custom Color in SSMS Using Redgate SQL Prompt
  • How to Install Python on Windows Server
Web Hosting

Recent Posts

  • F#: Seq, List, Array, Map, Set. Which One to Use?
  • How to Get Table Definition in SQL Server
  • Why You Need to Use a VPN
  • How to Use Custom Color in SSMS Using Redgate SQL Prompt
  • How to Install Python on Windows Server
  • RSS

Tags

.NET Core Access Adobe AdSense Amazon ASP.NET Cdonts Dll Classic ASP Code Editor Connect-It Copywriting ETL FSharp Genesis Framework Git Google HP Asset Manager HTML HTML5 Hugo IIS Information Security Internet Internet Information Services iOS Linux macOS Microsoft Microsoft SQL Server MVC PHP Simple Mail Transfer Protocol Smtp Server Social Media SQL SQL Server SSIS SSMS SSRS VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2021 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure