Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Strange command timeout

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2007-02-06 : 09:00:40
Andrey writes "Hello, team!

I have an Excel macros which queries to select recordset from MS SQL UDF via ODBC connection. Approximately once in a month it starts returning timeout error all the time without any changes in code. At the same moment the same query when being executed from Query Analyzer returns recordset and the execution time is significantly letter than timeout which it exceeds in macros. After UDF code is resaved (without any changes) in Enterprise Manager, the timeout error disappears. Is there any reasonable explanation of such behaviour?"

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2007-02-07 : 01:33:34
There are so many possibilities that it will be impossible to pinpoint based on the information supplied. Network traffic will have an effect. Server activity is also a variable that may be in play. Use oledb driver and not ODBC.

Usually, performance issues come down to index tuning and query optimization.

For us to offer more help, we'd like to see the query in question as well as the DDL for the table(s) querried (and indexes) and perhaps a few sample rows of data.
Go to Top of Page
   

- Advertisement -