Want to get data from two diffrent servers

  • Hi,

    I want to write a query involving in two diffrent servers in SQL QA. how can i achieve this ?

    Jeswanth

    --------------------------------

  • Thanks "Growl" learning the stuff.

    --------------------------------

  • Depending on your needs, an OPENROWSET might be used (e.g., in a join, to load a temp table, etc.) 

    RandyHelpdesk: Perhaps Im not the only one that does not know what you are doing. 😉

  • However it's done, be carefull to limit the records when possible.  In the OPENROWSET, be sure to use a WHERE when possible to limit the records returned.  With linked servers, simple joins might pull entire table over.  If so, consider using the REMOTE keyword in the join - see BOL.  Otherwise, perhaps a derived table, using a WHERE, might work to limit the record counts. 

     

    RandyHelpdesk: Perhaps Im not the only one that does not know what you are doing. 😉

  • Hi growl and stone

    Thanks for the replies it was really informative. each time i post a question i learned a lot .  in fact i done the job through a linked server. and the work was in development environment to compare two tables in diffrent servers  

    so no resources issue .

    thanks a lot

    jeswanth

    --------------------------------

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply