简体   繁体   English

SQL 2005超时已过期

[英]SQL 2005 Timeout Expired `

I am facing a SQL Timeout Expiration error while executing it through a website . 我通过网站执行SQL超时过期错误。 The actual bug shows 实际错误显示

Timeout expired. 超时时间已到。 The timeout period elapsed prior to completion of the operation or the server is not responding 操作完成之前经过的超时时间或服务器未响应

What i have tried 我尝试过的

  1. Goto SQL Server Settings and changed the Execution time from 600 to 0(for unlimited) 转到SQL Server设置并将执行时间从600更改为0(无限制)

  2. Also tried Timeout key on connection string in configuration file \\ 还尝试在配置文件中的连接字符串上设置超时键\\

No luck ! 没运气 ! Any options to try out 任何尝试的选择

检查你有没有appliedany 表,也可以锁定创建这样的问题。

You can specify the timeout on the SQL command, 您可以在SQL命令上指定超时,

SqlCommand myCmd = new SqlCommand("myStoredProcedure", myConnection);
myCmd.CommandTimeout = 300; 

But you really need to be looking at the query and/or your table structure, you shouldn't need to extend the timeout. 但是,您确实需要查看查询和/或表结构,不需要延长超时时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM