query 2 server at the same time


  • can some one please tell me with an example,how to query data from two db server in the same tsql query.

    Thanks in advace

    Friday, October 27, 2006 1:45 PM


  • You have to setup a linked server and then use full 4 parts to query the linked server.

    SELECT *
    FROM linkserver.dbname.schema.tablename
    JOIN tablename

    Friday, October 27, 2006 1:57 PM