query timeout

  • hello,

    is there a way to increase the query timeout parameter through the connection string ?

    or modifying it on the server ?

  • Try setting the connection string parameter "Connect Timeout"

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • How are you connecting to the server? ADO?

    Here is an ADO connection that sets the timeout.

    Set cn = New ADODB.Connection

    cn.ConnectionTimeout = 60

    cn.CommandTimeout = 60

    HTH

    Steve Hendricks

    MCSD, MCDBA

    AFS Consulting Group

    shendricks@afsconsulting.com

    (949) 588-9800 x15


    Steve Hendricks
    MCSD, MCDBA
    Data Matrix

    shendricks@afsconsulting.com
    (949) 588-9800 x15

  • A more important question might be - why am I timing out, have you asked the resident DBA, have you tried the same query from a remote query analyzer, did you try running it on the local server?

    Certainly there are legitimate reasons to increase the query timeout parameter, but more often then not, there is some underlying reason for the timeout that should be addressed.

    Good luck,

    Zach

    quote:


    hello,

    is there a way to increase the query timeout parameter through the connection string ?

    or modifying it on the server ?


    John Zacharkan


    John Zacharkan

  • I agree with zach_john. Track down and eliminate the reason for the timeout rather than increase the timeout value.

    Do you know whats causing it?

  • I also agree, the area I work for had increased to 6 mintues which ultimately caused more issues. The problem with increasing the timeout is people are impatient, for example we use a lot of Web based architecture with Crystal reports, people got tired of waiting and would close the browser, open it again and start the same query over. This would eventually cause the SQL server to bog down with requests and we would have to shut down. I decided after I got there this was nuts and we started fine combing everything and discovered indexes that did not exist, some combined indexes that needed to be seperated and we deleted 3 years worth of data which because it is a call center that had went thru major changes did not offer us any value at all. Now if it doesn't run in under 90 secounds I want it removed until we can find a better solution.

    Use QA and get the execution plan to see what is potentially slowing you down. Or if no QA you can do thru your app but I don't have a sample of this.

  • I agree with those who says that i have to check the query instead of increasing the query timeout, but i am using XMLRAD, and the default timeout is set to 30 sec.

    Most of my queries take between 30 and 55 sec. I do not think it is too long.

    The parameters i can change are through the connection's string !.

  • Not sure but take a look here at XML_MaxWaitingTime, this may be XMLRADs version of CommandTimeout.

    http://xmlrad.com/manual/Appendix14/

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply