1

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?

  • Can you give a little more detail as to what you are really trying to accomplish here? I'm assuming you have a Centralized Management Server stood up, and you are wanting take the query results executed across all those severs and place it somewhere, right? – H.79 Dec 19 '17 at 18:56
1

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.

0

If you've linked your servers together (think hard about this before you just do it), you could get them all in one place with a bunch of unions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.