gpt4 book ai didi

azure - 在 SQL Azure 数据库上使用 SQLMetal

转载 作者:行者123 更新时间:2023-12-03 04:39:32 26 4
gpt4 key购买 nike

由于我不想讨论的原因,我们的主数据库架构目前仅位于 SQL Azure 中。我们正在努力使用 Enzo Backup 之类的工具将其本地化(我们正在等待他们的开发人员修复我们在尝试下载时遇到的一些错误),但与此同时,我想生成一个 Linq-to-Sql来自 SQL Azure DB 架构的 ORM 映射。当我尝试执行此操作时,输出会生成一堆错误消息,如下所示:

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

是否可以从 SQL Azure 数据库生成 ORM 映射?

编辑

请注意,即使在最新版本 (2008 R2) 中,从 SSMS 生成脚本也不起作用。当您尝试在 SQL Azure 数据库实例上生成脚本时,您会在生成的报告中收到以下错误,并且在处理第一个对象之前就失败了:

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工具,它会生成相同类型的错误消息:

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

所以到目前为止,轻松生成 DDL 脚本似乎是不可能的,并且它在 SMO 处被破坏。 2008 R2 针对 SQL Azure DB 的级别。

最佳答案

看起来一切都可以追溯到 SMO。我终于在我的计算机上安装并运行了 2008 R2 SP1,看起来我将能够正确生成脚本(终于)。感谢大家的帮助!

关于azure - 在 SQL Azure 数据库上使用 SQLMetal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9622688/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com