尝试将数据库发布到 Azure 站点时出现以下错误:
17:13:29: Could not publish the site. Unable to publish the database. For more information, see "http://go.microsoft.com/fwlink/?LinkId=205387"
17:13:29: Error detail:
17:13:29: An error occurred during execution of the database script. The error occurred between the following lines of the script: "332" and "334". The verbose log might have more information about the error. The command started with the following:
17:13:29: "INSERT [dbo].[DBStatus] ([LastIndex], [LastUpdated"
17:13:29: Tables without a clustered index are not supported in this version of SQL Server. Please create a clustered index and try again. http://go.microsoft.com/fwlink/?LinkId=178587
17:13:29: Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE.
此链接解释了错误:http://blogs.msdn.com/b/sqlazure/archive/2010/04/29/10004618.aspx
有没有一种简单的方法可以将我的数据库转换为具有聚集索引,或者我应该选择具有 SQL Server 2012 托管的主机?
最佳答案
我不会仅仅因为这个而改变您的托管选项。添加聚集索引。
有一个工具叫 SQL Database Migration Wizard它可以分析 SQL 数据库并制作迁移脚本,甚至移动数据。它要做的事情之一是建议在没有聚集索引的表上建立聚集索引。然而,与任何工具一样,请确保您查看它的建议并看看它在您的场景中是否有意义。
我的建议是查看没有聚集索引的表并确定要创建的合理索引。像上面这样的工具可以提出建议,但它们只是建议,可能并不完全是您的 table 能从中受益的。
Azure SQL 数据库对聚集索引的要求来自于这样的事实:它们一式三份地复制数据,而聚集索引使该过程更快。
关于sql - 尝试将数据库发布到没有聚集索引的 Azure 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19347400/