【问题标题】:SchemaModel.SqlSpatialIndex: Timeout expiredSchemaModel.SqlSpatialIndex:超时已过期
【发布时间】:2016-03-08 15:57:05
【问题描述】:

我在尝试将 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...

重现问题的步骤:

  1. 打开 Visual Studio 2013
  2. 从菜单中,单击“查看”/“Sql Server 对象资源管理器”
  3. 连接到 SQL Server(在我们的例子中是 UAT 服务器)并选择一个数据库
  4. 从数据库的上下文菜单中,选择“创建新项目”
  5. 按“开始”

如何确定实际超时的原因?我该如何解决这个问题?

【问题讨论】:

  • “C:\Temp\Import From Prod 2\Import Schema Logs\Import From Prod 2_20160308024125.log”中有什么有用的吗?

标签: sql-server visual-studio-2013 sql-server-2014 database-project


【解决方案1】:

你能增加可用 RAM 的数量吗?这个确切的错误开始向我显示现有数据库项目和本地数据库之间的模式比较。当我关闭除 Visual Studio 之外的所有应用程序时,问题已解决。这让我觉得当我打​​开了几个应用程序时,我的电脑没有足够的资源在所需的时间内完成任务。

【讨论】:

    【解决方案2】:

    对我有用的一个选项是增加 HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\NN.N\SQLDB\Database\QueryTimeoutSeconds 的值并基于 this 重新启动 Visual Studio。但是,虽然成功了,但还是花了将近 5 分钟的时间来比较。

    后来我发现我们最近将构建目标更改为 Sql Server 2016,但仍在引用 2012 master.dacpac。我更新了对 2016 master.dacpac 的引用,现在不到一分钟就完成了比较。

    【讨论】:

      猜你喜欢
      • 2011-03-29
      • 2015-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-01
      • 1970-01-01
      • 2015-09-15
      相关资源
      最近更新 更多