SSAS 仅以编程方式备份元数据
我们有一组 SSAS 2005 数据库,由不同的员工维护。包括格式字符串等的元数据/模式已经发展到代表大量的工作,并且它们会定期更改。我们尝试过将商业智能项目置于源代码控制之下,但最好每晚备份所有 SSAS 元数据,而不需要数据本身。 (数据当然是巨大且可重复的,而架构很小。)
我可以使用 Microsoft.AnalysisServices.Server.Databases 集合以编程方式(C#)轻松循环遍历所有 SSAS 数据库,但我还没有找到一种简单的方法备份没有数据的架构。使用 SSMS,我可以右键单击数据库并选择 [Script Database as]-->[CREATE To]-->[File ...] 例如,并获取表示整个数据库元数据的 XMLA。此处引用:http://msdn.microsoft.com/en-us/ Library/ms174589.aspx,我相信这包含了我们想要备份的所有信息...但是我还没有在 Microsoft.AnalysisServices 程序集中找到提供类似功能的方法,并且不确定其他地方看看。
We have a set of SSAS 2005 databases that are maintained by various employees. The metadata/schema including format strings, etc. have evolved to represent a significant amount of work and they change periodically. We've tried having the business intelligence projects under source control, but it would also be nice to have a nightly backup of all SSAS metadata, without the data itself. (The data is of course huge and reproducible, whereas the schema is tiny.)
I can programmatically (C#) loop through all the SSAS dbs easily with the Microsoft.AnalysisServices.Server.Databases collection, but I haven't found a simple way to back up the schema without the data. Using SSMS, I can right-click the db and choose [Script Database as]-->[CREATE To]-->[File ...] for example and get XMLA representing the entire database metadata. This is referenced here: http://msdn.microsoft.com/en-us/library/ms174589.aspx, and I believe this has all the information we'd like to back up... however I haven't found methods providing similar functionality in the Microsoft.AnalysisServices assembly and am not sure where else to look.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道我可能有点晚了,但事情就这样了..
这是 PowerShell,但转换为 C# 很容易:
这不是我的,我发现了它 此处 其中 达伦·戈斯贝尔发布了它。
I know I may be kind of late, but here it goes..
This is PowerShell, but converting to C# is a breeze:
It's not mine, I found it here where Darren Gosbell posted it.
我找到了解决方案:
I've found a solution: