简体   繁体   中英

Failed to call stored procedure from Power BI

I am trying to call a stored procedure in Power BI desktop

USE [Adventure]

DECLARE @return_value int

EXEC    @return_value = [dbo].[sp_powerbi]

SELECT  'Return Value' = @return_value

But I get the following error:

Details: "Microsoft SQL: The EXECUTE permission was denied on the object 'sp_powerbi', database 'Adventure', schema 'dbo'."

It is strange to me because I had already been able to use a procedure stored in another report and I did not get this error. Do I have to do some configuration in Power BI?

Where can I check the permissions that Power BI mentions? Or where can I check the permissions in Power BI or SQL Server?

You need to execute the below command in the SQL database which is your source:

GRANT EXECUTE
ON SCHEMA::[dbo] TO [< User >];

This is not a PowerBI issue but access issue in the database side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM