记一次查询超时的解决方案The timeout period elapsed......

https://www.cnblogs.com/wyt007/p/9274613.html

Exception has been thrown by the target of an invocation

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
语句已终止。

问题描述

在数据库中执行查询语句,大约1秒钟查询出来,在C#中用ado进行连接查询,一直等待很久未查出结果,最后抛出查询超时异常。

异常内容如下:

Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

解决方案:

exec sp_updatestats

执行结果:

参考文章:

https://stackoverflow.com/questions/8602395/timeout-expired-the-timeout-period-elapsed-prior-to-completion-of-the-operation

https://docs.microsoft.com/zh-cn/sql/t-sql/statements/update-statistics-transact-sql?view=sql-server-2017

记录一次在生成数据库服务器上出现The timeout period elapsed prior to completion of the operation or the server is not responding.和Exception has been thrown by the target of an invocation的解决办法的更多相关文章

  1. 解决 Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. 的问题

    在web 网站开发中,经常需要连接数据库,有时候会出现这样的数据连接异常消息: 主要原因是 应用程序与数据库的连接超出了数据库连接的默认时长,在这种情况下,我们可以把数据库连接的时长延长一些,因为 C ...

  2. C#解决微信支付Exception has been thrown by the target of an invocation(调用的目标发生了异常)的问题

    今天搭建微信扫码支付环境的时候,一样的配置参数,调用连接提示错误 错误:调用的目标发生了异常 然后跟踪到执行 MD5 md5 = System.Security.Cryptography.MD5.Cr ...

  3. Visual studio 2013打开报异常"Exception has been thrown by the target of an invocation"

    最近遇到一个问题,打开VS2013和SQL Server2014都会出报错,错误信息如下: 以前都是好好的,重启了机子也不行,能打开两个VS,再打开第三个VS还是会报错,百度无果,还是在google上 ...

  4. Exception has been thrown by the target of an invocation 网站报错

    最近因为要做一个启动器,在使用WPF做UI的时候,发现有错误如下: 错误 1 未知的生成错误"此实现不是 Windows 平台 FIPS 验证的加密算法的一部分. 行 8 位置 3.&quo ...

  5. Exception has been thrown by the target of an invocation

    I'd suggest checking for an inner exception. If there isn't one, check your logs for the exception t ...

  6. 网站错误记录:Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool.

    今天看公司项目的错误日志文件,发现日志文件都是记录的这个错误. 经过网站查找,发现英文翻译是: 译:超时,与连接池的连接时间已过.这种情况发生是因为连接池在使用和最大连接池数目已满 通过翻译,可以看出 ...

  7. 如果数据库上的row格式是mixed或者mixed的格式,如何对比两台数据库服务器上的数据是否一致呢

    如果数据库上的row格式是mixed或者mixed的格式,如何对比两台数据库服务器上的数据是否一致呢

  8. Solve VS2010 Error "Exceptions has been thrown by the target of an invocation"

    Sometimes when you open a VS2010 project, an error window will pop up with the error message "E ...

  9. Unable to resolve target 'android-8'类似错误的解决办法

    导入android项目出现:出现Unable to resolve target 'android-8'错误及其他的一些解决办法 - 为梦想而飞 - 博客频道 - CSDN.NEThttp://blo ...

随机推荐

  1. 基于roslyn的动态编译库Natasha

    人老了,玩不转博客园的编辑器,详细信息转到:https://mp.weixin.qq.com/s/1r6YKBkyovQSMUgfm_VxBg 关键字:Github, NCC, Natasha,Ros ...

  2. 性能监控工具的配置及使用 - Spotlight On Oracle(oracle)

    一.    Spotlight On Oracle(oracle)1.1.   工具简介Spotlight是一个强有力的Oracle数据库实时性能诊断工具,提供了一个直观的.可视化的数据库活动展现.S ...

  3. Centos中编辑php扩展库

    今天需要在Centos中编译Exif库以便获取图片的exif信息,可在Linux中从来没有编译过扩展库呀,只好查资料了.发现是用phpize这个东东来编译扩展. 首先执行了下 php -i | gre ...

  4. vue pc客户端项目总结

    https://blog.csdn.net/oumaharuki/article/details/78861778

  5. maven 学习---Maven本地资源库

    Maven的本地资源库是用来存储所有项目的依赖关系(插件jar和其他文件,这些文件被Maven下载)到本地文件夹. 很简单,当你建立一个Maven项目,所有相关文件将被存储在你的Maven本地仓库. ...

  6. FPM 1.1正式版 Search & List

    前面写的FPM都是自己练习用的.直到自己正式用了一个,才发现一些小问题.feeder class写在一起和分开写有好有坏,这里就不说了. 自己做了个小的查询报表如下: 现在来按SAP官方的做法来重新做 ...

  7. Spark实现分组TopN

    一.概述 在许多数据中,都存在类别的数据,在一些功能中需要根据类别分别获取前几或后几的数据,用于数据可视化或异常数据预警.在这种情况下,实现分组TopN就显得非常重要了,因此,使用了Spark聚合函数 ...

  8. CAS 集群部署

    业务场景 单点登录服务器如果压力过大的情况,那么可以使用集群分担压力,但是cas 默认不支持session同步. 所以可以需要做session同步,可以使用j2cache 实现session同步.另外 ...

  9. Linux服务管理之DHCP

    1.DHCP服务简介 DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)是一个局域网的网络协议,使用UDP协议工作, 主要有两个用途:给内部网络或网络 ...

  10. python常用模块二正则表达式

    正则表达式 常用的正则元字符 # =================================匹配模式================================= #一对一的匹配 # 'h ...