尝试将SQL Server数据库反向工程为数据库项目时,我收到超时错误。我们在该数据库上没有任何空间索引(我检查了using this)。
我没有在连接上设置超时(
3/8/2016 9:46:00 AM An error was received from SQL Server while attempting to reverse engineer elements of type Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSpatialIndex: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
3/8/2016 9:46:00 AM An exception was generated.
Unable to reconnect to database: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
3/8/2016 9:46:00 AM An error was received from SQL Server while attempting to reverse engineer elements of type Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSpatialIndex: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
3/8/2016 9:46:00 AM Finished importing database.
3/8/2016 9:46:00 AM A summary of the import was saved to the following location: C:\Temp\Import From Prod 2\Import Schema Logs\Import From Prod 2_20160308024125.log
3/8/2016 9:46:00 AM Click Finish to continue...
重现问题的步骤:
我如何弄清楚究竟什么是超时?我该如何解决这个问题?
答案 0 :(得分:1)
对我有用的一个选项是增加HKEY_CURRENT_USER \ Software \ Microsoft \ VisualStudio \ NN.N \ SQLDB \ Database \ QueryTimeoutSeconds的值,并根据this重新启动Visual Studio。但是,虽然成功了,但需要花费将近5分钟进行比较。
后来我发现我们最近将构建目标更改为Sql Server 2016,但仍然引用了2012 master.dacpac。我更新了对2016 master.dacpac的引用,比较现在在不到一分钟的时间内完成。
答案 1 :(得分:0)
可以增加可用内存量吗?现在的db项目和本地数据库之间的模式比较开始出现这个确切的错误。当我关闭除Visual Studio之外的所有应用程序时,问题得以解决。这让我觉得当我打开多个应用程序时,我的电脑没有足够的资源来完成任务。