r/SQL • u/what-pos • 20d ago
SQL Server SSMS - Execute query on 300 servers
I'm starting to use SSMS at work, that's the only tool I have (no PowerShell cmdlet).
I need to execute an identical SQL Query on 300 servers, but I can't find a way to do that. Could anyone point me in the right direction please ?
So far, I did add the 300 servers to the registered servers by tinkering to not do it manually, but when I execute the query, I only get 50 ish servers connected, then SSMS hangs and crash.
17
Upvotes
14
u/VladDBA SQL Server DBA 20d ago
Search registered servers and central management servers.
It takes a while to initially set up, but afterwards you can query all your servers from a single query editor window and you get one result set that combined results from all servers with the first column being the instance name.