Sql-server – Combine results of Multi-Server Query from Registered Servers

multi-server-adminsql serversql server 2014

Is there a way to insert result of a query executed in Registered Servers into a view / sp / table?

Currently I have locally setup a Registered Server on multiple servers to query the master database for each.

I basically want to insert the result in a single container then read it by a job.

It this possible?

Best Answer

No, there is no built-in way to accomplish this due to each query in a Multi-Server query being executed in a separate connection to each individual server. The results only exist together within SSMS. I always had to copy and paste the results grid into Excel so that I could do further aggregations and sorting.

Fortunately, I am very close to releasing a new product that does exactly what you are wanting to do. There will be a free version that has some limitations. A paid version allows for multithreading. It currently comes in two forms: command-line utility and SQLCLR Stored Procedure.

If you are interested in beta-testing, please contact me. I will update this answer with more details once it is officially released.