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

  • Question

  • Hello,

    I am getting "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding." error. I am using SQL server 2005. . I tried with following solution,

    1. increasing a command timeout to 0

    2. dispose the command object

    3. add set nocount on in procedure and query

    4. changes the command time out from 1000 to 3000

    I tried above all solution I didnt get success. Please can anyone help me in same.

     

    • Moved by Bob Beauchemin Tuesday, December 7, 2010 7:57 AM Moved to a more relevent forum (From:.NET Framework inside SQL Server)
    Tuesday, December 7, 2010 7:05 AM

Answers

  • Does it take long time to execute same statement from inside of SQL Server Management Studio? If yes, then most likely you have issues with indexing. In this case you would need to tune it. You could start with the following tool

    http://msdn.microsoft.com/en-us/library/ms173494.aspx

    But do not do it on production data until you are sure it is tuned properly and does not affect other parts of database


    Val Mazur (MVP)

    http://www.xporttools.net

    • Marked as answer by liurong luo Friday, December 17, 2010 6:13 AM
    • Unmarked as answer by liurong luo Friday, December 17, 2010 6:14 AM
    • Marked as answer by liurong luo Monday, December 20, 2010 10:47 AM
    Tuesday, December 14, 2010 11:49 AM
    Moderator

All replies

  • When do you receive timeout - during command execution or during process of establishing connection to the database? If it is during opening connection then you need to chnage ConnectionTimeout property of the connection. If it is during command execution then what kind of SQL statement do you execute? Did you try to execute same SQL statement from inside of SQL Server Management Studio? If yes, how much time does it take to execute that statement from SQL Server Management Studio? Can you post snippet of the code that executes that command?

     


    Val Mazur (MVP)

    http://www.xporttools.net

     

    Tuesday, December 7, 2010 11:41 AM
    Moderator
  • I am getting during command execution. I am exceuting insert statement. the data is getting inserted from one table to another table. the data i am inserting into the table is having indexing. As per my understanding indexing is creating a problem.

    Please let me know your suggestion.

    Monday, December 13, 2010 11:58 AM
  • Does it take long time to execute same statement from inside of SQL Server Management Studio? If yes, then most likely you have issues with indexing. In this case you would need to tune it. You could start with the following tool

    http://msdn.microsoft.com/en-us/library/ms173494.aspx

    But do not do it on production data until you are sure it is tuned properly and does not affect other parts of database


    Val Mazur (MVP)

    http://www.xporttools.net

    • Marked as answer by liurong luo Friday, December 17, 2010 6:13 AM
    • Unmarked as answer by liurong luo Friday, December 17, 2010 6:14 AM
    • Marked as answer by liurong luo Monday, December 20, 2010 10:47 AM
    Tuesday, December 14, 2010 11:49 AM
    Moderator
  • Thankyou!!!

    I will go thorugh the link and see if it is helpful.

    Tuesday, December 14, 2010 12:16 PM
  • In SQL Server Management studio it is taking average time. Please let me known than also it is an indexing issue.

    Thanks in advance for your help.

    Tuesday, December 14, 2010 12:21 PM
  • What is average time? Do you mean same similar time to the time it takes when SQL statement executed through the application? If times are close then most likely it is an indexing issue.
    Val Mazur (MVP)

    http://www.xporttools.net

    Wednesday, December 15, 2010 11:37 AM
    Moderator