Click on the banner to learn about and purchase my database training on Azure

How to register and create server groups in SQL Server Managment Studio (And set the color of each server)

Views: 2.469 views
Reading Time: 3 minutes

Today I bring a very quick post, but it is a very nice feature of SQL Server Managment Studio that a DBA of the company that I work (Tiago Neves) showed me, and that allows you to change the color of the status bar according to the server that we are connecting to.

It may sound silly, but in the everyday life of a DBA it makes all the difference, especially if you're a professional who connects to multiple SQL Server servers, be they Development, Testing, Homologation, or PRODUCTION, as well as making it easy to manage. and organization of the servers and their respective purposes.

If there are dozens or hundreds of servers in your environment, it will make your life easier, as you will no longer have to decorate a server name or create a txt file to store the names.

Creating groups and registering servers

Open the registered servers screen, as shown below.
Register Server - Part 1
Create server groups to organize your environment (eg Development, Production, etc.) by right-clicking and selecting the option. "New Server Group ..."

After creating the groups, add your servers to the corresponding groups by right-clicking on the created Group and selecting the option. "New Server Registration". It is on this screen that we will define the color of each server
Register Server - Part 2

Register Server - Part 3

Using Clusters and Registered Servers

After you create the groups and associate the servers, your screen should look like this
Register Server - Part 4

When you double-click on a server, the “Object Explorer” screen will open with the objects of that server (Can be opened with the right button> Object Explorer too).

Register Server - Part 7

When you right-click on these servers and then on the “New Query” option, the status bar will have the color you defined. Very useful to get your attention that your query is running on a Production instance, for example.
Register Server - Part 5
Register Server - Part 6