Skip to main content

Managing multiple SQL Server instances from SQL Server Management Studio

Between all this AI craziness, we often forget to appreciate the small tools and features that make our lives easier. Such  a feature is Central Management Servers (CMS), a built-in SQL Server feature that lets you manage a whole fleet of instances from one place.

Let's walk through what it is, how to set it up, and when it'll actually make your life easier.

So, what is a Central Management server?

At its core, CMS is a SQL Server instance that acts as your hub for organizing and talking to other SQL Server instances. You register your other servers under it, group them however makes sense (by environment, team, region — you name it), and then query all of them at once.

The metadata about your registered servers gets stored in the msdb database on the CMS host. Nothing fancy — it's just a central directory that SSMS knows how to use.

Setting it up in SSMS

Here's how to get going in SQL Server Management Studio:

Step 1: Open the Registered Servers panel

Head to View → Registered Servers in the top menu, or just hit Ctrl+Alt+G. You'll see a panel appear — this is where everything lives.

Step 2: Register Your Central Management Server

  1. Right-click Central Management Servers in the panel
  2. Select Register Central Management Server
  3. Fill in the connection details for the server you want to use as your hub
  4. Hit Save

One thing to keep in mind: the CMS host cannot register itself as one of the managed servers. Pick a dedicated instance if you can.

 

Step 3: Add your other servers

Now you can start populating it with the instances you want to manage:

  1. Expand your new CMS node
  2. Right-click on a group (or the root) → New Server Registration
  3. Enter the target server name and credentials
  4. Repeat for each server you want to manage

You can also create Server Groups first to keep things tidy — for example, groups like Production, Staging, and Dev make it easy to target the right set of servers later.

The best part: Multi-server queries

Once your servers are registered, you can run a single T-SQL query across all of them at once.

Here's how:

  1. Right-click a server group (or the CMS root)
  2. Select Connect → New Query
  3. Write your query and run it

SSMS will execute it against every server in that group and return a combined result set — with a Server Name column automatically prepended so you know where each row came from.

SELECT @@SERVERNAME AS ServerName, @@VERSION AS Version;

Run that against your entire fleet in seconds. No more copy-pasting connection strings.

For developers specifically, this is gold when you're tracking down environment discrepancies — like why a query behaves differently in staging vs. production, or whether a certain database option is set consistently everywhere.

Before you go all-in, a couple of things worth knowing:

  • Authentication matters. Windows Authentication works smoothly across servers. SQL logins require each server to have the same credentials, which can get messy fast.
  • Queries run sequentially, not in parallel. If you have a large group of servers, be patient — or break them into smaller groups.
  • Results are read-only in the multi-server query grid. You can SELECT all day, but you won't be editing data through this view.

Wrapping up

Central Management Servers won't change your life overnight, but once you've got it set up, you'll wonder how you lived without it. Being able to fire off a query across every environment in one shot — especially during an incident or an audit — is a genuine time-saver.

If you're managing more than two or three SQL Server instances regularly, it's absolutely worth spending 20 minutes to get CMS configured. Future you will be grateful.

Popular posts from this blog

Kubernetes–Limit your environmental impact

Reducing the carbon footprint and CO2 emission of our (cloud) workloads, is a responsibility of all of us. If you are running a Kubernetes cluster, have a look at Kube-Green . kube-green is a simple Kubernetes operator that automatically shuts down (some of) your pods when you don't need them. A single pod produces about 11 Kg CO2eq per year( here the calculation). Reason enough to give it a try! Installing kube-green in your cluster The easiest way to install the operator in your cluster is through kubectl. We first need to install a cert-manager: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml Remark: Wait a minute before you continue as it can take some time before the cert-manager is up & running inside your cluster. Now we can install the kube-green operator: kubectl apply -f https://github.com/kube-green/kube-green/releases/latest/download/kube-green.yaml Now in the namespace where we want t...

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

Podman– Command execution failed with exit code 125

After updating WSL on one of the developer machines, Podman failed to work. When we took a look through Podman Desktop, we noticed that Podman had stopped running and returned the following error message: Error: Command execution failed with exit code 125 Here are the steps we tried to fix the issue: We started by running podman info to get some extra details on what could be wrong: >podman info OS: windows/amd64 provider: wsl version: 5.3.1 Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:2655: connectex: No connection could be made because the target machine actively refused it. That makes sense as the podman VM was not running. Let’s check the VM: >podman machine list NAME         ...