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
 General SQL Server Forums
 New to SQL Server Programming
 Run-time error 2147217871 (80040e31)"

Author  Topic 

eem_2055
Yak Posting Veteran

69 Posts

Posted - 2007-09-27 : 06:51:35
Hi guys,

I'm having a problem wiht this: Run-time error -2147217871 (80040e31)". There are times that this error does not occur. But there are times that this error occurs. I am using a third party software. And we don't have enough support at this moment. May I know what should I do. Moreover. We are using VB 6.0 for front end. Then SQL server 2000 for back end.

Thanks

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2007-09-27 : 07:11:01
Looks like a timeout error to me.
EDIT: see here http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=44969
[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-27 : 09:31:39
"we don't have enough support at this moment."

If you aren;t doing regular maintenance of your database (reindexing and updating statistics, as well as backing up your TLog (if DB in FULL Recovery model) that could be making it sub-optimal, and doing some housekeeping might make it fast enough.

If the database is big (>4GB say) and you are using SQL version 2000 then automatic expansion set to 10% (the default) could cause timeouts too. Change the expansion to a fixed size, e.g. 50MB, instead of 10%

Kristen
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-09-27 : 09:36:20
You can extend the default command timeout property from default 30 seconds to any value.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

oceanboy
Starting Member

44 Posts

Posted - 2007-10-08 : 00:41:10
sounds familiar to my problem recently. When I run the stored procedure for different value, the time used for each run is different. you can either
1) set the timeout value to a bigger value like Peso Suggested
OR
2) rewrite the query/ stored procedure if possible. eg use less subqueries with join in my case. For the same SP, I re-written some part of the TSQL and it came down from 17 minutes to 1min40sec.

Your case could be different and mine used a lot dynamic SQL. Not sure how much it affects because I am not very experience myself.

Go to Top of Page
   

- Advertisement -