excel - 多个成员mdx查询返回错误(访问指定成员的权限)

标签 excel azure ssas mdx olap-cube

我想提一下,我是 SSAS 和 MDX 的新手。

在过去的几天里,我一直在思考一个 excel 生成的查询出错了。

问题在于,当尝试从联机多维数据集数据源读取数据时,Excel 会生成查询,从而阻止对该多维数据集的其他读取。该查询是针对 AZURE 多维数据集执行的,我设法对其进行分析并获取以下查询:

with set __XLUniqueNames as {[Stores].[Chain].[Chain].&[SuperBrugsen], [Stores].[Chain].[Chain].&[Salling], [Stores].[Chain].[Chain].&[SuperBrugsen] } 
set __XLDrilledUp as 
Generate(__XLUniqueNames, 
{ IIF([Stores].[Chain].currentmember.LEVEL_NUMBER <= 2147483647, 
    [Stores].[Chain].currentmember, 
    Ancestor([Stores].[Chain].currentmember, 
            [Stores].[Chain].currentmember.LEVEL_NUMBER - 2147483647)) } ) 
member [Measures].__XLPath as 
Generate( 
    Ascendants([Stores].[Chain].currentmember), 
                [Stores].[Chain].currentmember.unique_name, 
                "__XLPSEP") 
select { [Measures].__XLPath } on 0, 
__XLDrilledUp on 1 
from [SomeCube] 
cell properties value

每次查询包含多个成员(该维度的现有成员)时,都会出错并显示以下消息:

"Either you do not have permission to access the specified member or the specified member does not exist.".

我尝试过的:

  • 首先,我尝试识别出错误的成员组合模式,但没有成功。似乎对于某些某些成员我收到了错误,而对于某些成员则没有。对于多维数据集中不存在的单个成员、重复成员和成员组合,不会出错。

  • 其次,我确实在不同的多维数据集(本地 SSAS)上尝试了查询,但没有收到错误。

  • 第三,通过修改连接字符串,我尝试使 Excel 忽略缺少的成员,希望它能够使用设置为“忽略”的“MDXMissingMemberMode”标志来工作。我没有工作。

  • 第四,我尝试剖析查询以查看哪个子句给出了错误。由于我对 MDX 的了解有限,我怀疑“currentmember”及其“LEVEL_NUMBER”属性有问题。我的猜测是,它无法获取集合中下一个成员的当前成员。

  • 第五,最后一件事也是最长的,我偶然发现在 SSMS 中你可以在 mdx session 中执行查询(右键单击多维数据集 -> 新建查询)或者你可以在浏览中打开多维数据集模式(右键单击多维数据集 -> 浏览),这会产生类似于 mdx 查询的 UI。 不出意外,在这种浏览“模式”下,我的查询每次都会成功执行。对此很感兴趣,我开始分析该请求并看看有什么不同。不同之处在于一些额外的 xml 结构,例如带有属性的列表。看到这一点,我想我可以操纵 Excel 中的连接字符串来发送一些属性以使其工作,但最终我没有工作。

其他有效的特性:

<PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis">
        <Catalog>SomeCatalog</Catalog>
        <ShowHiddenCubes>true</ShowHiddenCubes>
        <SspropInitAppName>Microsoft SQL Server Management Studio</SspropInitAppName>
        <Timeout>3600</Timeout>
        <LocaleIdentifier>1033</LocaleIdentifier>
        <ClientProcessID>24400</ClientProcessID>
        <DataSourceInfo/>
        <Format>Tabular</Format>
        <Content>Schema</Content>
        <DbpropMsmdFlattened2>true</DbpropMsmdFlattened2>
        <ReturnCellProperties>true</ReturnCellProperties>
        <DbpropMsmdActivityID>2309dfa2-3607-41b2-9446-8ece2f5ababa</DbpropMsmdActivityID>
        <DbpropMsmdCurrentActivityID>2309dfa2-3607-41b2-9446-8ece2f5ababa</DbpropMsmdCurrentActivityID>
        <DbpropMsmdRequestID>d3dbd079-5ca7-496c-ab55-afea71889238</DbpropMsmdRequestID>
</PropertyList>

其他不起作用的属性:

<PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis">
        <Catalog>SomeCatalog</Catalog>
        <SspropInitAppName>Microsoft SQL Server Management Studio - Query</SspropInitAppName>
        <LocaleIdentifier>1033</LocaleIdentifier>
        <ClientProcessID>24400</ClientProcessID>
        <DataSourceInfo/>
        <Format>Native</Format>
        <AxisFormat>TupleFormat</AxisFormat>
        <Content>SchemaData</Content>
        <Timeout>0</Timeout>
        <DbpropMsmdActivityID>e5e75ad6-8fca-4f25-abba-047f86198602</DbpropMsmdActivityID>
        <DbpropMsmdCurrentActivityID>e5e75ad6-8fca-4f25-abba-047f86198602</DbpropMsmdCurrentActivityID>
        <DbpropMsmdRequestID>8901787f-15a7-48a0-86eb-18ff0b92bdc4</DbpropMsmdRequestID>
</PropertyList>

Excel 附加属性:

<PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <Catalog>SomeCatalog</Catalog>
    <Timeout>0</Timeout>
    <Format>Native</Format>
    <DbpropMsmdFlattened2>false</DbpropMsmdFlattened2>
    <SafetyOptions>2</SafetyOptions>
    <Dialect>MDX</Dialect>
    <MdxMissingMemberMode>Error</MdxMissingMemberMode>
    <DbpropMsmdOptimizeResponse>9</DbpropMsmdOptimizeResponse>
    <DbpropMsmdActivityID>9D69640F-553A-4970-BD4E-7234F1CD928C</DbpropMsmdActivityID>
    <DbpropMsmdRequestID>B5E10FF0-EF2F-409E-83BF-CD2DBA20C2BE</DbpropMsmdRequestID>
    <LocaleIdentifier>1030</LocaleIdentifier>
    <DbpropMsmdMDXCompatibility>1</DbpropMsmdMDXCompatibility>
</PropertyList>

单个成员工作 mxd 查询的结果:
SuperBrugsen [商店].[链式店].[链式店].&[SuperBrugsen]__XLPSEP[商店].[链式店].[全部]

<小时/>

这是我可以为我的问题收集的所有信息。我的下一步是向 Microsoft 寻求帮助,但由于成本问题,我暂时还不想这样做。

你们中有人可以帮我吗?任何想法或建议都非常受欢迎,因为我没有想法了。

最佳答案

看来问题已经自行解决了。最有可能的是有一个更新解决了这个问题。引用号到 azure 更新日志页面:https://azure.microsoft.com/en-us/updates/?product=analysis-services&status=nowavailable

关于excel - 多个成员mdx查询返回错误(访问指定成员的权限),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57456526/

相关文章:

python-3.x - 尽管在同一目录中,但 .env 文件内容在 docker compose 构建期间未被替换

sql - 数据立方体设计 : hard-to-aggregate measure

iphone - 如何使用 objective-c 从 Excel 文档中读取单元格数据

java - 尝试将数据写入 JAVA 中的多个工作表时 XLSX 文件损坏

azure - 使用应用服务身份验证 (EasyAuth) 和自定义 OpenID 提供程序保护 Azure Function 时受众无效

sql-server - 在 SSAS 中为 ROLAP 和 MOLAP 建模不规则层次结构的最佳方法是什么?

sql-server-2008 - MDX 中的日期范围问题缺少日期

excel - 将 Excel VBA 代码注入(inject)从外部源接收的电子表格并执行

excel - java.lang.NoClassDefFoundError : org/apache/poi/ss/usermodel/Workbook

azure - 如何克服日志问题?