Forum Discussion

Markzolotoy's avatar
Markzolotoy
Impactful Individual
5 years ago

How to get data from a stored proc in DirectQuery mode

when I apply something like this:

exec sp1 in DQ mode I get this incorrect syntax near the keyword 'EXEC'. Incorrect syntax near ')'.

Next suggestion was use OpenQuery:

Gettin Error while loading the SP data using Direc... - Microsoft Power BI Community

First of all you need to configure SQL Server to allow Data Access. Which is already a huge problem: Try explaining to your client that you need to change his server settings. But for the sake of exercise I have modified my server. Here is the next error:

Details: "Microsoft SQL: Cannot process the object "EXEC dbname.dbo.sp_name". The OLE DB provider "MSOLEDBSQL" for linked server "servername" indicates that either the object has no columns or the current user does not have permissions on that object.

So, what is that?

Now, the reason for DQ is that as far as I know with Import if a user runs a paginated report than he is not getting the latest data unless he refreshes a dataset first. Ok, that be done. But what about a scheduled report export. Will that refresh a dataset automatically?

 

Thanks