超时已过期。在操作完成之前经过的超时时间或服务器没有响应。如果我执行“Exec Sp_Updatestats”它正在解决,但我正在寻找永久的解决方案 [英] Timeout Expired.The Timeout Period Elapsed Prior To Completion Of The Operation Or The Server Is Not Responding.If I Execute "Exec Sp_Updatestats" It's Resolving But Am Looking For Permanent Solution

查看:974
本文介绍了超时已过期。在操作完成之前经过的超时时间或服务器没有响应。如果我执行“Exec Sp_Updatestats”它正在解决,但我正在寻找永久的解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

try
           {
               PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);
               SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
               cmd.CommandTimeout = 3600;
               cmd.Parameters.Clear();
               return rdr;
           }
           catch
           {
               conn.Close();
               throw;
           }

推荐答案

我们无法帮助您处理这些信息。你正在执行你的SQL超时。您需要使用可用的SQL工具,如SQL Analyzer,Estimated Execution plan等,以确定瓶颈所在的位置,然后创建索引或视图或其他内容以使其更具响应性。



如果预计需要很长时间,那么你总是可以增加cmd.CommandTimeout的超时时间。
There is no way we can help you with this little bit of information. You are getting a timeout executing your sql. You need to use the sql tools available to you, like SQL Analyzer, Estimated Execution plan, etc, to determine where the bottleneck is and then create indexes or views or something to make it more responsive.

If it is expected to take a long time then you could always increase your timeout on cmd.CommandTimeout.


这篇关于超时已过期。在操作完成之前经过的超时时间或服务器没有响应。如果我执行“Exec Sp_Updatestats”它正在解决,但我正在寻找永久的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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