Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 21st, 2006, 08:04 AM
Authorized User
 
Join Date: Dec 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Timeout Expired Error

hi,
I have made a windows service in c#.net. By this service in database we delete some rows again insert them. Also with this table a trigger is associated on insert which does the same with a table in different database of same server. This service is working fine and database is being updated every second. The problem is after some time it gives timeout expired error by .Net sqlClient and does not update table until we restart service. Please assist what I m doing wrong and what should I do?
Thanks in advance
Dharmendra

__________________
Dharmendra
Software Engineer
 
Old December 22nd, 2006, 01:52 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

Are you remembering to close the connection after you use it?
If you are using an explicit transaction, are you remembering to do a COMMIT?
Is something causing a DeadLock or Block somewhere?

--Jeff Moden
 
Old December 22nd, 2006, 02:13 AM
Authorized User
 
Join Date: Dec 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,
I scanned my code and the connections are closed everywhere after use aslo I m not using any explicit transaction. Ys I aslo guess there is something causing a DeadLock or Block but not getting where this may be? FYI this service is a multithreaded application and each thread do the same with different tables.

Dharmendra

 
Old December 22nd, 2006, 04:17 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You may be running into problems where a given connection is only allowed to be retained for a period of time that is less than the period of time it takes to execute what your trying to execute. Can you have your dot net code call up a stored procedure so that it doesn't have to maintain a conneciton while the process your describe is taking place?


 
Old December 22nd, 2006, 04:18 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For diagnostic testing can you put "no lock" on all your queries to see if that makes a difference. This can help to determine if it's a deadlock issue.








Similar Threads
Thread Thread Starter Forum Replies Last Post
Login Timeout Expired error smnel ASP.NET 2.0 Basics 0 May 7th, 2008 06:58 AM
Error:-2147217871 Timeout expired sgsandeep SQL Server 2000 11 November 20th, 2007 08:49 PM
Timeout Expired Error nikotromus SQL Server 2000 16 December 5th, 2006 03:54 PM
Timeout Expired Error dbalachandar SQL Server 2000 3 July 28th, 2006 01:35 AM
Timeout Expired Error vinod_pawar1 SQL Server 2000 5 July 17th, 2004 09:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.