超时过期的SQL执行错误 [英] Timeout expired SQL Execution error

查看:361
本文介绍了超时过期的SQL执行错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQL执行错误

超时时间已到.操作完成之前已过超时时间,或者服务器没有响应.

SQL Execution error

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

How to solve the timeout expired issue?

推荐答案

更改连接字符串以增加超时:
Change Connection string to increase time out:
Data Source=SomeDBServer;Initial Catalog=SomeDB;Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False;Connect Timeout=60;


在数据库端执行查询,并确认问题出在哪里,

一些问题的原因,

可能是由于该表的锁定,
该表上没有适当的索引创建
可能有很多记录,例如在某些情况下缺少某些记录,请创建维护计划以重组索引,
如果要使用OLAP数据,请在查询中添加nolock,
仍然遇到问题,然后从应用程序中检查命令超时值并相应地进行更改.
Execute the query in Database side and verify where exactly the problem is,

Some of the problem causes,

It may be due to lock of that table,
There is no proper index creation on that table
May be there is a bunch of records like some lacks in that case create a maintainance plan to reorganize the indexes,
If you want the data for OLAP then put a nolock in the query,
Still you face the problem then check your command time out value from your application and change it accordingly.




我猜您的事务正在处理大数据查询,否则可能存在某些数据库连接问题.您必须找到原因的DB连接,但是对于处理下面的链接的大数据可能会有所帮助.

提高性能 [ ^ ]

希望对您有所帮助.
Hi,

I guess your transaction is processing the query on Large data, or some database connection problem may be there. The DB connection you have to find the cause but for the processing the large data below link may help you.

Improve the performance[^]

hope it helps.


这篇关于超时过期的SQL执行错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆