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

Views: 1.465
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

Double clicking on a server will open the “Object Explorer” screen with the objects on that server (Right click> Object Explorer too).

Register Server - Part 7

Right clicking on these servers and then clicking on the “New Query” option will bring up the status bar with the color you set. Very useful for getting your attention that your query is running on a Production instance, for example.
Register Server - Part 5
Register Server - Part 6