Saturday, February 25, 2012

[Microsoft] [ODBC SQL Server Driver] Timeout Expired

I've tried every websearch possible to try and get a solution for this problem but can't.

Development Software:
SQL Server 2000
Enterprise Manager 8.0
Query Analyzer 8.00.194

Error:
When I run a mildly complex view in Enterprise Manager I get the error:[Microsoft][ODBC SQL Server Driver]Timeout Expired
after about 30 seconds.

When I copy and paste and run the exact same code in Query Analyzer the Query runs for longer than 30 seconds and runs until completion. Now my question is since this apparently seems to be an Enterpise Manager problem and not on the server end, where do I go in Enterprise Manager to change that setting? I've looked everywhere in Enterpise manager and can't find a "command timeout" setting.

Thanks!http://vyaskn.tripod.com/watch_your_timeouts.htm|||http://vyaskn.tripod.com/watch_your_timeouts.htm

Thanks for the link. Am I looking at the COM+ section on that webpage because the other two don't look like they apply to Enterprise Manager? I see the default timeouts for the COM+ settings are 60 seconds when Enterprise Manager is timing out at about 30 seconds. I tried upping the first setting in the COM+ section to 10 minutes to no avail. I can't locate the "common" folder to up the second setting under the COM+ section (DB.StoredProcedure).|||a quick search netted me this little tidbit:
QA has no time limit on how long you can inspect results, and you cannot adjust the timeout in Enterprise Manager.

Hence, do what you are trying to do in QA, and save yourself the headache.|||Here's one place to check (from BOL) ... open QA & run sp_configure:



query wait Option

In Microsoft SQL Server, memory-intensive queries, such as those involving sorting and hashing, are queued when there is not enough memory available to run the query. The query times out after a set amount of time calculated by SQL Server (25 times the estimated cost of the query) or the time amount specified by the non-negative value of the query wait.
Use the query wait option to specify the time in seconds (from 0 through 2147483647) that a query waits for resources before timing out. If the default value of -1 is used, or if 1 is specified, then the time-out is calculated as 25 times of the estimated query cost.

http://www.dbforums.com/mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\adminsql.chm::/Basics/important.gif
Important A transaction containing the waiting query may hold locks while the query waits for memory. In rare situations, it is possible for an undetectable deadlock to occur. Decreasing the query wait time lowers the probability of such deadlocks. Eventually, a waiting query will be terminated and the transaction locks released. However, increasing the maximum wait time may increase the amount of time for the query to be terminated. Changes to this option are not recommended.

query wait is an advanced option. If you are using the sp_configure system stored procedure to change the setting, you can change query wait only when show advanced options is set to 1. The setting takes effect immediately (without a server stop and restart).
To set the query wait option
http://www.dbforums.com/mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\adminsql.chm::/plus.gifTransact-SQL (http://javascript<b></b>:hhobj_1.Click())
http://www.dbforums.com/mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\adminsql.chm::/plus.gifSQL-DMO (http://javascript<b></b>:hhobj_2.Click())

See Also


RECONFIGURE (http://javascript<b></b>:hhobj_3.Click())
Setting Configuration Options (mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL% 20Server\80\Tools\Books\adminsql.chm::/ad_config_3wmr.htm)
sp_configure (http://javascript<b></b>:hhobj_4.Click())
Thread and Fiber Execution (http://javascript<b></b>:hhobj_5.Click())

No comments:

Post a Comment