In this post we’re going to quickly setup a registered server group and add to it three local SQL services that I have running on my machine. First though you may not be able to see the registered servers window, in order to display this go to the View menu -> Registered Servers or CTRL+ALT+G (I’m using SSMS 18 in this example)
Here’s my server list, currently blank. It has two groups already setup; one Local Server Groups where we will add our connections to and there’s also a group created for connections that have already been setup in Azure Data Studio.
To create a server group we need to right click on Local Server Groups and select the New Server Group option. This displays the new server group properties dialog box allowing us to give the group a name and add a description.
Clicking OK creates our new group under Local Server Groups:
Now we can start adding servers to our Local Test group.
On my machine I have three different instances of SQL Server running (I can run services.msc or use the dbatools command Get-DbaService to view these) and I’ll start by adding my localhost default instance to the group.
Right click on the newly created Local Test group and select New Server Registration, the following is displayed:
This is an example where I have already filled in the relevant details. The top half is the connection details which is the same as connecting to any instance in Management Studio. Here I’m connecting to localhost (my default instance on this machine) using Windows authentication.
For my registered server I’ve given the instance a different name; Local Default Instance and added a description. In this case it’s my guillotines presentation testing server, although I might know the purpose of the server it’s really useful to add a description should I need to export the server list for somebody else.
That’s all we need to do so now we can click Test just to check that the connection is valid, hopefully we’ll see this message displayed:
If our connection test fails we’ll see an error message like the following in which case we’ll need to check the server details are correct and that it’s up and running etc:
If the test does work we can click save which will store the instance and it’s connection details in our server group:
If we hover over the name we’ll see a tooltip displaying the server description we added earlier, this is way better than looking through databases and trying to work out what they’re used for.
Now the real advantage comes with adding multiple servers to our group so now we’ll add another of my local instances to the server group, repeating the exact same process as before but with a different instance. In this example I’m going to add a 2012 instance of SQL Server Express, here’s my registered server group now:
We’ve now got a server group (Local Test) containing two different registered servers. As previously mentioned, organising our server lists into groups is really useful for large estates, particularly where different environment types are used. We could use a separate server group for our production and non-production instances, or even separate them by version or workload, just don’t over complicate the list with lots of groups and sub-groups!