简体   繁体   English

无法从 Power BI 调用存储过程

[英]Failed to call stored procedure from Power BI

I am trying to call a stored procedure in Power BI desktop我正在尝试在 Power BI 桌面中调用存储过程

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'."详细信息:“Microsoft SQL:在 object 'sp_powerbi'、数据库 'Adventure'、架构 'dbo' 上的 EXECUTE 权限被拒绝。”

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?我必须在 Power BI 中进行一些配置吗?

Where can I check the permissions that Power BI mentions?在哪里可以查看 Power BI 提到的权限? Or where can I check the permissions in Power BI or SQL Server?或者我在哪里可以检查 Power BI 或 SQL 服务器中的权限?

You need to execute the below command in the SQL database which is your source:您需要在源数据库 SQL 中执行以下命令:

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

This is not a PowerBI issue but access issue in the database side.这不是 PowerBI 问题,而是数据库端的访问问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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