execution time out

Last post 11-24-2008 6:58 AM by madhuottapalam. 3 replies.
Page 1 of 1 (4 items)
Active Topics My Discussions Unanswered Sort Posts: Previous Next
  • 11-22-2008 8:07 AM

    • myat
    • Not Ranked
    • Joined on 11-22-2008
    • Posts 3

    execution time out

    Hi All,

         I have one simple query to update old code with new code, but there are estimated 3 million records inside the table and need to update more than 10 to 20 tables. I create index key but at the fist time always face time out problem. do you have any idea how to avoid time out connection.

    Query as :

    UPDATE Table1 SET Ccode = @newCode WHERE Ccode = @oldCode

    UPDATE Table2, 3, 4, ....

     Appreciate your kindly suggest !

  • 11-22-2008 12:34 PM In reply to

    Re: execution time out

    Welcome to the forum...

    First make sure the query is using the right indexes and run in QA and see how much time it takes...

    then depends on the update query time you need to adjust application time or you have to write the update code in such a way application should get some response back from SQL server to wait...otherwise you will get the timeout...

     

    MohammedU.
    Microsoft SQL Server MVP
    Moderator
    SQL-Server-Performance.com

    All postings are provided “AS IS” with no warranties for accuracy.
  • 11-22-2008 9:09 PM In reply to

    • myat
    • Not Ranked
    • Joined on 11-22-2008
    • Posts 3

    Re: execution time out

    Hi,

          Thanks ur reply. Actually i don't get time out in QA, it takes about 1 min or sometimes more than that. but when calling from the application, every fist time facing the time out connection. do you have any sample how to capture the response back from sql server in the application?

     

    Regards.

  • 11-24-2008 6:58 AM In reply to

    Re: execution time out

    Check the timeout parameter in Connection string. Increase it if possible. You may also try the update in batches. When you update it may be locking the whole table.  So do the update in batches. ALso check the indexes being used. I f you do not have index that may also cause the blocking

     

    Madhu

    Madhu K Nair
    http://madhuottapalam.blogspot.com/
    http://experiencing-sql-server-2008.blogspot.com/
Page 1 of 1 (4 items)
Active Topics   My Discussions    Unanswered Posts


© 2000 - 2007 vDerivatives Limited All Rights Reserved.