Local Server Group queries

March 4, 2008

This is really quite cool, especially since it’s a tool feature, and one that will help SQL Server 2005 installs.

Suppose you have many servers, all registered in Management Studio, in the Registered Servers window. Now you can right-click on the Local Server Group, and pick the “New Query” option. Write a query, and it gives you a result set including the results from all the servers, as if you’d done a UNION ALL using linked servers.

So now if you want to do something like

select name, database_id from master.sys.databases;

on a query against multiple servers, you get three columns. Server Name, plus the columns from the query.


Leave a Reply

LobsterPot Blogs

Blog posts by Rob Farley and other LobsterPot Solutions team members.


Related Blogs