Have you ever heard of a colored connection in SQL Server? Well, may be few but not everyone reading this blog post would have come across colored connections feature of SQL Server 2008. Let’s take a closer look at colored connections feature of SQL Server 2008 Management Studio in this article.
Well, as we all know while laying electric cables / wiring the entire house / campus, various colored cables / wires are used. The main purpose of this is to be able to differentiate the cables using colors both at the time of initial setup as well as during repair / maintenance. Colored Connections in SQL Server also work pretty much on the similar lines.
In SQL Server 2008 Management Studio (SSMS), while connecting to a server / database in the Connect to Server window where we enter the server details and the credentials, there is an Option button at the Right-Bottom corner as shown in the below window.
In the above window click on Options>> button & go to Connection Properties tab and check the Use Custom Color check box. Click on Select… button to select any color of your choice from the list of available colors or you can define your own custom color as shown in the below screenshot.
In the above screenshot I have selected the color green since it’s a development server and one can do anything & everything as long as the database does not conflict with other developers.
With the use of this feature one can give distinct color to each of the servers / databases that are frequently used like Dev, Test, UAT / Pre-Prod, Prod etc as shown in the below screenshot.
This color coding / coloring a connection in SSMS reminds the developers / testers etc about the environment in which they are working, so that they can pay necessary attention before firing any query.
Well, that is all about Colored Connections, which is a very nice feature introduced in SQL Server 2008 Management Studio and also a little bit on the best practices of Registering / Grouping frequently used Servers / Databases in SQL Server.
Let me know if you have tried using this feature and what has been your experience in using this feature.