How to troubleshoot ODBC timeout errors experienced by applications accessing SQL Server?
There are a lot of reasons why one ends up with a timeout error. This article discusses the most common reasons that result in timeouts. For more specific information on handling timeouts, along with code samples, read the article: DBA’s Quick Guide to Timeouts By default, ADO connections time out after 30 seconds. So, your query or stored procedure is obviously taking more than 30 seconds to complete. You can verify this by running your query/stored procedure in Query Analyzer and noting the execution time. You can also use Profiler to see the execution time of queries (Start time, End time and Duration columns in Profiler). Once you confirm that the query indeed is taking more than 30 seconds, find out why it is taking more than 30 seconds and see if you can tune it to make it quicker. The most obvious step is to look at the Execution plan in Query Analyzer. Any table scans are bad. Make sure you have right indexes on your tables, and that the query is written in an efficient way and