Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Direct Query with two linked servers?

I know Direct Query does not work when retreiving data from two separate servers, in which case Import must be used, but will it work if the two servers are linked?

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Wow, been a little bit since I've worked with linked servers. But, I'm going to go with probably not on this one. Typically linked servers are configured to enable the Database Engine to execute a Transact-SQL statement that includes tables in another instance of SQL Server, or another database product such as Oracle. But, those linked servers are still essentially separate instances or references and you generally have to write some funky SQL to reference them. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the fast reply v-xjiin-msft!  I see you were able to query the linked server by itself but are you able to query both the linked Server and non-linked Server in the same query using Direct Query mode?

      • v-xjiin-msft's avatar
        v-xjiin-msft
        Solution Sage

        Anonymous

         

        Nope. It is not possible to query non-linked server.

         

        Thanks,
        Xi Jin.

  • Direct quyery have a several limitations 

    You should use a Data Virtualization Plataform such as Querona querona.com to connect multiple data sources and also permit to have the data on line