在 Excel 中跟踪 Analysis Services 生成的 MDX
有没有办法跟踪通过在 Excel 中查询多维数据集生成的实际 MDX,并获取实际使用的 MDX?
我尝试过使用 SQL Profiler,虽然它确实返回 MDX,但它没有考虑连接正在使用的角色(它在单独的 PropertySet 中传递)。
我只是想获取查询正在使用的 MDX,因为它似乎没有使用不同的角色(但使用相同的基本 MDX 查询)正确过滤。
更新:好吧,也许我需要更清楚一点。我正在尝试获取在应用角色后在多维数据集上触发的结果查询。
SQL Profiler 为我提供 MDX 以及 PropertySet 中角色的名称,这是在应用角色之前的。
更新 2: 如果有帮助的话,这是我一直用来测试功能的 MDX 查询。
select {[Measures].[Company Value]} on columns,
{[Dim Model].[Title Name].Members} on rows
from [DWHName]
Is there a way to trace the actual MDX generated by querying a Cube in Excel, and get the actual MDX used ?
I've tried using SQL Profiler, and while that does return the MDX, it doesn't take into account the role that the connection is using (it's passed in a separate PropertySet).
I'm just wanting to get the MDX that the query is using, as it doesn't appear to be filtering correctly using different roles (but the same base MDX query).
Update: Ok, maybe I need to be a bit clearer. I'm trying to get the resulting query that is firing at the Cube, after the Role has been applied.
SQL Profiler gives me the MDX, and the name of the role in a PropertySet, so is before the Role is applied.
Update 2: In case it helps, this is an MDX query that I've been using to test the functionality.
select {[Measures].[Company Value]} on columns,
{[Dim Model].[Title Name].Members} on rows
from [DWHName]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可能想尝试 codeplex 中的以下加载项。 http://olappivottableextend.codeplex.com/ 它只提供发送到 OLAP 服务器的内容。但请注意,它添加了一堆额外的 mdx 来显示 UI。
You might want to try the following add-in from codeplex. http://olappivottableextend.codeplex.com/ It just gives you what was sent to the OLAP server. BEWARE though, it adds a bunch of extra mdx that does UI display.
我很确定你实际上无法得到你想要的东西。安全角色是连接或运行查询的用户的属性,对结果集施加的各种限制将应用在查询引擎中。因此,您永远看不到应用了哪些限制(我认为这本身可能就是一个安全问题)
I'm pretty sure you can't actually get what you're after. The security role is a property of the connection or of the user running the query and the various restrictions put on the resultset are applied in the query engine. So you never get to see what restrictions are applied (which, I suppose, could be a security issue in itself)
我不确定我是否正确理解了您的问题,但可以使用宏查询
PivotTable.MDX
属性来获取 Excel 生成的 MDX。请参阅
I'm not sure whether I've properly understood your question, but it is possible to get the MDX generated by Excel using a macro to query the
PivotTable.MDX
property.See here for an example implementation.
也不确定我是否理解。你是说你想看到这个角色会看到的结果吗? (跟踪中的 MDX 正是提交的内容,不是吗?)
您是否尝试过通过 MDX Studio(您可以在其中设置连接的角色)执行捕获的 MDX?
Not sure I understand either. Are you saying that you want to see the results that role will see? (The MDX in the trace is exactly what was submitted, no?)
Have you tried executing the captured MDX through MDX Studio (where you can set the Role for your connection)?