Skip to content
Category: SQL Server
2022-10-18

Learning to organize SQL Server Management Studio for different environments

Welcome to Aleson ITC’s blog. In today’s post we will talk about how to define custom color codes for connections in SQL Server.

We must be careful when executing any query, for this we can see to which instance we are connected through the bar of our SQL Server Management Studio.

To know what environment we are working in, we will determine a series of colors as we will see below.

  • Dev
  • Pre-prod
  • Prod

This will help us to know in which environment we are working, that is, imagine that we have several environments to work in, Production, Pre-production and Development, since it would be convenient to know through a series of colors in which environment we are, in order to avoid errors when run code in the wrong environment.

In this post, I tell you what is the best way to organize Prod, Preprod and Dev servers.

How will we do?

1 – First we must connect to Management Studio and access View > Registered Servers.

We can create multiple Local Server Groups and within them organize more groups and subgroups. 2 – Upon entering Database Engine we will have Local Server Groups and there we will create the new server groups: DEV, PREPROD, PROD.

Once created, we should have something like this.

3 – To assign the instances to the groups we must enter New Server Registration:

4 – Let’s go to Connection Properties > Use Custom Color to set a color to the server, which will vary depending on the environment:

The color will appear in the SSMS status bar when selecting New Query.

One of the things to keep in mind is that these colors are only local in the SSMS and it is recommended not to have the same colors for different environments, this way we will avoid mistakes.

The configuration of the server groups will only be seen by our Windows user, but we can export it to a file to add it to other servers.

5 – To export it we must follow the following steps:

To finish, we will add the name with which we want this file to be exported.

It is convenient to uncheck the indicated option so that users and passwords are not included in the exported file.

To import, we will do the same by selecting the file we want to move.

And so far today’s post, we hope it will help you when working with SSMS.

If you liked it, don’t miss our TOP Posts about SQL Server.


Query Store y Automatic Tuning en SQL Server 2017

Free monitoring using InfluxDB, Telegraf and Grafana

If you want us to help your company with our SQL Server solutions, contact us.

Complete este formulario para recibir la guía de Windows Server en Azure
*Obligatorio
Complete este formulario para recibir la guía de Windows Server en Azure
Gracias por rellenar el formulario [name]. ¡Aquí tienes tu eBook Gratis!
Complete este formulario para recibir 4 best practices to implement a comprehensive Zero Trust security approach
*Obligatorio
Complete este formulario para recibir 4 best practices to implement a comprehensive Zero Trust security approach
Gracias por rellenar el formulario [name]. ¡Aquí tienes tu eBook Gratis!
Complete este formulario para recibir Cloud Migration Essentials
*Obligatorio
Complete este formulario para recibir Cloud Migration Essentials
Gracias por rellenar el formulario [name]. ¡Aquí tienes tu eBook Gratis!
Complete este formulario para recibir Cloud security Advice for Nonprofit Leaders
*Obligatorio
Complete este formulario para recibir Cloud security Advice for Nonprofit Leaders
Gracias por rellenar el formulario [name]. ¡Aquí tienes tu eBook Gratis!
Complete este formulario para recibir Prevent data leaks with Microsoft 365 Business Premium
*Obligatorio
Complete este formulario para recibir Prevent data leaks with Microsoft 365 Business Premium
Gracias por rellenar el formulario [name]. ¡Aquí tienes tu eBook Gratis!
Complete this form to recieve the guide of Windows Server on Azure
*Required
Complete this form to recieve the guide of Windows Server on Azure
Thank you for filling out the form [name]. Here's your Free eBook!
Complete this form to recieve 4 best practices to implement a comprehensive Zero Trust security approach
*Required
Complete this form to recieve 4 best practices to implement a comprehensive Zero Trust security approach
Thank you for filling out the form [name]. Here's your Free eBook!
Complete this form to recieve Cloud Migration Essentials
*Required
Complete this form to recieve Cloud Migration Essentials
Thank you for filling out the form [name]. Here's your Free eBook!
Complete this form to recieve Cloud security Advice for Nonprofit Leaders
*Required
Complete este formulario para recibir Cloud security Advice for Nonprofit Leaders
Thank you for filling out the form [name]. Here's your Free eBook!
Complete this form to recieve Prevent data leaks with Microsoft 365 Business Premium
*Obligatorio
Complete this form to recieve Prevent data leaks with Microsoft 365 Business Premium
Thank you for filling out the form [name]. Here's your Free eBook!
Complete this form to recieve Cloud Migration Simplified Ebook.
*Obligatorio
Complete this form to recieve Prevent data leaks with Microsoft 365 Business Premium
Thank you for filling out the form [name]. Here's your Free eBook!