cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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 6
Highlighted
Super User IX
Super User IX

Re: Direct Query with two linked servers?

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. 


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

Not link spamming! If I posted a link in reply it is because I did assume you know how to search the web but thought it was the fastest way to fix your issue.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Solution Sage
Solution Sage

Re: Direct Query with two linked servers?

@tombrown406

 

I have made some tests in my Power BI desktop (Feb 2018 update). And I can use Direct Query to load linked server data with SQL statement in Advanced options:

 

3.PNG

 

Also, there's other way to load linked server in Power BI. Please refer:

https://community.powerbi.com/t5/Desktop/specifying-linked-server/td-p/294416 

 

Thanks,
Xi Jin.

Highlighted
Frequent Visitor

Re: Direct Query with two linked servers?

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?

Highlighted
Solution Sage
Solution Sage

Re: Direct Query with two linked servers?

@tombrown406

 

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

 

Thanks,
Xi Jin.

Highlighted
Frequent Visitor

Re: Direct Query with two linked servers?

@v-xjiin-msft

 

Sorry, I should have been more clear in my question.  Let me ask it a different way: in a scenario where two servers are linked, can both be queried in Direct Query mode at the same time or can just one of them?

Helper II
Helper II

Re: Direct Query with two linked servers?

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

 

 

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors