SQL - 查询多维数据集
所以我刚刚收到了一个到我们的 SQL 数据库中的 Cube 的连接字符串。 我应该创建一份报告,可以通过电子邮件将这些数据发送给大约 30 个人。
我更愿意编写一个存储过程,然后让 SSRS 在需要的时候将其发送出去。 问题是数据库非常复杂,我不确定是否可以匹配所有内容并获取正确的信息。
无论如何,我可以编写一个存储过程来查看多维数据集中的信息吗?
我不确定这是否重要,但数据库和多维数据集位于同一 SQL 服务器上。
有关立方体的任何信息都会有所帮助。 我知道他们会根据它们最常使用的用途进行一些预先计算。
谢谢
So i just received a connection string to a Cube in our one of our SQL databases. I'm supposed to create a report that can be emailed to 30 something people off of this data.
I would much rather write a stored procedure and just let SSRS send it out whenever its supposed to. The problem is that the database is extremely complex and I'm not sure I can match everything up and get the correct information.
Is there anyway that I can write a store procedure that will look at the information in a cube?
I'm not sure if this matters but the database and the cube are on the same SQL server.
Any information about cubes would be helpful. I know that they to some pre-calculations based on what they will probably be used the most for.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试 OpenQuery 和/或 OpenRowset 并通过 MDX
Try OpenQuery and/or OpenRowset and pass through the MDX
您可以使报表使用常规存储过程,但该存储过程仍然必须运行针对多维数据集的 MDX 查询(通过 OLEDB)。
我不确定您使用的是什么报告; 具体来说,无论它是本地报告还是基于服务器的报告,但 SQL Server 的基于服务器的报告确实有一个 MDX 生成器,它对初学者隐藏了 MDX 语法,并且足以填充简单的表(SSRS 2008 中的 Tablix)和基于矩阵的报告。 对于更复杂的报告,它有助于学习 MDX 语法。
如果您使用本地报告(在应用程序服务器上运行,而不是在报告服务器上运行),您必须了解 MDX 语法,因为您必须使用此 MDX 查询通过中间件组件上的 OLEDB 提供程序来查询 Analysis Services 多维数据集。
另一件事是,当您需要从摘要向下钻取和/或钻取详细信息时,最好使用多维数据集。 它们最适合用于对具有维度信息的数据(度量)进行切片和切分。 矩阵控件是查看多维数据集中的数据的最佳工具,数据单元格本身代表一个度量,该单元格的列和标题代表一个度量。 然后,矩阵将根据您选择的维度自动“转换”数据。
You can make your report use a regular stored procedure but that stored procedure still has to run an MDX query that goes against the cube (via OLEDB).
I am not sure what report you are using; specifically whether it is a Local or Server based report but SQL Server's server based reports do have an MDX generator which hides the MDX syntax from beginners and is adequate for populating straightforward Table (Tablix in SSRS 2008) and Matrix based reports. For more complex reporting, it helps learning the MDX syntax.
If you are using Local reports (runs on the app server as opposed to the reporting server) you have to know the MDX syntax because you will have to use this MDX query to query the Analysis Services Cube via an OLEDB provider on your middleware component.
One more thing, cubes are best utilized when you need to drill down and/or drill through from summary down to detailed information. They are best used for slicing and dicing data (measures) with dimension information. The matrix control is the best tool to view data in a cube with the data cell itself representing a measure and the column(s) and header(s) for this cell representing a measure. The matrix will then "transform" the data automatically depending on which dimension you choose.
两种不同的语言 - T-SQL 是用于查询关系数据的 RDBMS 工具; 要与多维数据集对话,您可以使用 MDX。
two different languages - T-SQL is the RDBMS tool for querying relational data; to talk to cubes you use MDX.