Home Forums SQL Server 2008 SQL Server Newbies Run a query against registered servers and insert results into table RE: Run a query against registered servers and insert results into table

  • stebennettsjb (3/6/2012)


    Hi MarkusB,

    Thanks im properly being dim..

    But wouldn't that create a temp table on every server, with the results of only the server its created on. I would like to run a query against the servers and store all results into 1 table on a specific server.

    Thanks

    S

    I am not sure if you have found the solution for this, but using OPENQUERY or Link Server you can do that. Since it is one off event you may want to go with OPENQUERY.

    1. Create a table on any one server (say ServerA) you like.

    2. Use OPENQUERY on ServerA to get the data from all the other servers.

    Please post here if you face any problem in this.


    Sujeet Singh