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.
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).
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
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.
Enjoy this cool feature!