使用SQLMetal上的SQL Azure数据库 [英] Use SQLMetal on SQL Azure Database

查看:126
本文介绍了使用SQLMetal上的SQL Azure数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关,我不喜欢讨论的原因,我们的主数据库模式目前只在SQL Azure中。我们正在努力把它倒在本地使用的工具像恩佐备份(我们正在等待他们的开发人员修复了一些bug当试图下载我们得到了),但在此期间,我想生成一个LINQ到SQL从SQL Azure的DB模式ORM映射。当我试图做到这一点,输出产生这样的一堆错误信息:

For reasons that I would not like to discuss, our master database schema is currently only in SQL Azure. We are working on bringing it down locally using a tool like Enzo Backup (we're waiting on their developers to fix some bugs we got when attempting to download), but in the meantime, I would like to generate a Linq-to-Sql ORM mapping from the SQL Azure DB schema. When I attempt to do this, the output generates a bunch of error messages like this:

警告:SQM1012:无法提取表从DBO [表名]。
  SqlServer的。无效的对象名称SYSCOMMENTS'。

Warning : SQM1012: Unable to extract table 'dbo.[TableName]' from SqlServer. Invalid object name 'syscomments'.

是它在所有可能从SQL Azure数据库生成ORM映射?

Is it at all possible to generate ORM mapping from a SQL Azure database?

修改

请注意,从生成的脚本SSMS不能正常工作,甚至在最新的版本(2008 R2)。你在生成的报告以下错误,当您尝试生成SQL Azure数据库实例脚本和前处理,即使第一个对象失败:

Note that Generate Scripts from SSMS doesn't work, even in the newest version (2008 R2). You get the following error in the generated report when you try to generate scripts on a SQL Azure database instance, and it fails before processing even the first object:

System.IndexOutOfRangeException:索引的范围之外
  数组。在
  Microsoft.SqlServer.Management.SqlScriptPublish.GeneratePublishPage.worker_DoWork(对象
  发件人,DoWorkEventArgs E)在
  System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs E)在
  System.ComponentModel.BackgroundWorker.WorkerThreadStart(对象
  参数)

System.IndexOutOfRangeException: Index was outside the bounds of the array. at Microsoft.SqlServer.Management.SqlScriptPublish.GeneratePublishPage.worker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

编辑2

我只是尝试使用免费的 SMOscript 工具,它产生的同种错误信息:

I just attempted to use the free SMOscript tool, and it generates the same kind of error message:

Objects in database [DatabaseName] on server [ServerAddress]:
Error: Index was outside the bounds of the array.

因此​​,它看起来到目前为止好像很容易产生DDL脚本是出了问题,而且它在的 SMO 水平2008 R2对SQL Azure的数据库。

So it looks so far like easily generating DDL scripts is out of the question, and it's broken at the SMO level for 2008 R2 against a SQL Azure DB.

推荐答案

看起来一切跟踪回SMO。我终于安装并在我的电脑上工作2008 R2 SP1,它看起来像我就可以正确地生成脚本(最终)。感谢您的所有帮助大家!

Looks like everything tracks back to SMO. I finally got 2008 R2 SP1 installed and working on my computer, and it looks like I'll be able to generate scripts correctly (finally). Thanks for all your help everyone!

这篇关于使用SQLMetal上的SQL Azure数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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