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
 SQL Server Development (2000)
 TimeOut issue

Author  Topic 

cheryl
Starting Member

1 Post

Posted - 2002-12-19 : 07:29:10
I have created a monster of a store procedure that takes over 5 minutes to run. When I try to run this from a .NET aspx page I am getting a timeout error from the database. Do I have to change a setting on the database to increase the time before it times out or is this an issue on the .NET side - is it a parameter of the connection string or something?

Thanks in Advance
Cheryl

P.S. I know 5 minutes is ridiculous but can't seem to get it any faster.

Argyle
Yak Posting Veteran

53 Posts

Posted - 2002-12-19 : 07:36:03
Change the CommandTimout limit in your connectionstring or when executing your command. Default is 60 seconds I think.

Example:
http://www.aspalliance.com/aspxtreme/sys/data/sqlclient/sqlcommandclasscommandtimeout.aspx

/Argyle



Go to Top of Page

drman
Starting Member

38 Posts

Posted - 2002-12-19 : 13:46:50
cheryl,

did changing the commandtimeout work for you. I am having the same problem w/vb 6.0 sp5 and SQL 2000. I execute a store procedure that updates a set of records. When the number of records is small, no problem, but I may have recordsets that contain over 100,000 records to be updated. I have increased the timeout to 120 and am still not able to correct the timeout error. I am presently trying to update 38000 records.

Let me know if it works for you

Thanks

DRMAN

Go to Top of Page

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2002-12-19 : 14:26:25
Cheryl,

Post your stored procedure, the tables it affects, some sample data and what it should be doing and someone might be able to help you optimize it.

Go to Top of Page

drman
Starting Member

38 Posts

Posted - 2002-12-19 : 15:15:08
After additional searching for a solution to my timeout error, I found the following problem posted on 11-27-2002.

[url]http://www.sqlteam.com/forums/link.asp?TOPIC_ID=21969[/url]

My problem was not with the setting of the commandTimeout, but issues with the locking of records. The removeal of a particular recordset that I was creating cleared up the problem. 38000+ records are updated in about a second...

Much thanks to this site and its participants...

DRMAN



Go to Top of Page
   

- Advertisement -