Configure colors for db connections [video]

 

There is a video available for this article on youtube.com.

In this presentation I would like to show you a very useful feature of SSMS – Registered Servers – Local Server Groups.

If you work with multiple different database servers on different environments, I think you will also find it helpful. It allows to define connections including credentials and properties.

Besides a possibility of saving frequently used connections for convenience, it also offers defining connection colors. And this is the reason why I really like it – it makes me feel more comfortable that I am on the server I wanted to be.

By default, a main window of this feature is not visible. You can enable it by going to View -> Registered Servers. Then Registered Servers window should appear just above Object Explorer on the left side of SSMS.

Enable Registered Servers

Now, you can expand Database Engine.
To add a server, you can do a right mouse button click on Local Server Groups and choose New Server Registration (optionally you can also create separate groups for different environments using New Server Group button).

registerServer

You can type all information you want to save (like server name, username, password) and set appropriate settings of the connection (like default database, time-outs). There is also a possibility to define a color. A color will remind you which server you are connected to. For example:
- green – development
- yellow – staging
- red – production

set color

Defining a color decreases a risk of accidentally running a script on production – there is higher chance that you will notice red color of the window then a small text at the bottom with a server name.
Once you registered a server, you can just double click on it to create a connection. It should show up in Object Explorer. Now, new query windows opened to the registered server should have the defined color at the bottom.

connection colors

Enjoy this cool feature!

 

 

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.