我在SQL Server实例中调用表时的MDX权限错误 [英] MDX permission error when I call a table in SQL Server instance

查看:86
本文介绍了我在SQL Server实例中调用表时的MDX权限错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在MDX中执行此查询

I am trying to execute this query in MDX

INSERT INTO MINING STRUCTURE [People1]
([CustID], [Name], [Gender], [Age], [CarMake],[CarModel])
OPENQUERY(Chapter3Data,
'SELECT [Key], Name, Gender, Age, CarMake, CarModel
FROM People')

在我的SQL Server实例中,我的数据库Chapter3Data具有people表,但是出现此错误:

I have a database Chapter3Data with people table in my SQL Server instance, but I get this error :

执行查询...
"Ehsan \ ehsan akbar"用户没有访问"Chapter3Data"对象的权限,或者该对象不存在.
执行完成

Executing the query ...
Either the 'Ehsan\ehsan akbar' user does not have permission to access the 'Chapter3Data' object, or the object does not exist.
Execution complete

推荐答案

问题是您应该链接到在Analysis Services实例上定义的数据源的名称,而不是关系数据库的名称,或者链接服务器或数据源视图(DSV).在绊倒雷蒙德·李(Raymond Li)对题为D

The problem is that you should be linking to the name of a Data Source defined on that instance of Analysis Services, not a relational database, or the name of a linked server, or a data source view (DSV). I made all three of those mistakes before finally getting it right, after stumbling on to Raymond Li's answer to the post titled DMX INSERT Openquery Permission Problem at MSDN. It's definitely counterintuitive of Microsoft to implement it this way, since you'd plug in a database or linked server any other time you use OPENQUERY, but that's what works.

这篇关于我在SQL Server实例中调用表时的MDX权限错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆