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 July 21st, 2005, 11:31 PM
Authorized User
 
Join Date: Aug 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Timeout Expired Error

Hey Guys,

I am getting a "timeout expired" error in sql server every time I try to update, delete or insert more than 100,000 rows into a table. The table that I am trying to work on has about a half million records in it. I am running the queries straight from the enterprise manager console. (The queries are also failing when I run them from my vb app). Any Idea what I am doing wrong here?

Here is what I have tried:
- Put the database in simple mode so that the logs will not compound
- In query analyzer, under Tools -> options -> Connection Properties, I set the query time out to 0.

I'm kind of bummed because sql server was hyped up to be this great database that could handle heavy loads, and so far Access is kicking the crap out of it.

Any assistance would be greatly appreciated.

Ryan

nikotromus
__________________
nikotromus
 
Old July 22nd, 2005, 12:17 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Not sure if this will work, but has for me in the past. In EM right click on the server and choose properties. Click on the Connectins tab. There you can set the Query Tiimeout to 0.

 
Old July 22nd, 2005, 08:19 PM
Authorized User
 
Join Date: Aug 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey jbenson001,

That was one of the first things I tried. It didn't yeild any results for me. It's pretty frustrating. I am doing this as a side project at night. I work for one of the worlds biggest corporations during the day. I talked to a sql server dba there, and I followed all of his advice. He is now out of ideas for me. I switched from microsoft Access to sql server thinking that I would get a big boost in performance. It has been a huge let down so far.

nikotromus
 
Old July 22nd, 2005, 11:11 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Well SQL server is a much better tool than access. You can't even compare the 2. I am suprised you are getting a timeout error if you have set it to 0.
Let me ask. Are you using tables from different servers, maybe one server's timeout is 0 while the other still has one set? I have run into that issue as well.

Let me know what you come up with. I will try to think of more possibilites

Good luck...
Jim

 
Old July 23rd, 2005, 06:30 PM
Authorized User
 
Join Date: Aug 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Jim,

I am running SQL server locally from my machine (2.4 gig processor, .5 gigs or RAM). I am writing queries both from enterprise manager and a visual basic application. It gives the same error from either instance. I am working on my machine locally and sending the code to a business in Alabama. My boss there has his own network set up with his own instance of SQL server. He gets the exact same errors that I get when he executes deletes, inserts or update statements on tables with more than a half million records. Thats why I was thinking that it must be a common error with a simple solution. Apparently I am wrong.

Thanks for the reply. I appreciate the effort.

nikotromus
 
Old July 23rd, 2005, 06:40 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Ryan,

Are there any column indexes or triggers on the table?

Scott

 
Old July 23rd, 2005, 07:48 PM
Authorized User
 
Join Date: Aug 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Scott,

Yes. I have the unique key indexed.

Ryan


nikotromus
 
Old July 23rd, 2005, 11:35 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

OK, but any others, like foreign keys, unique constraints, etc? The reason i am asking is because it seems to me that there is some process that is affecting the CRUD (Create, Read, Update, Delete) actions on the table.

 
Old July 24th, 2005, 01:39 AM
Authorized User
 
Join Date: Aug 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Scott,

That is the only index. It is also the primary key.


nikotromus
 
Old July 24th, 2005, 02:35 AM
Authorized User
 
Join Date: Aug 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Scott,

You got me thinking about the indexes on the table, and the fact that maybe the table might be corrupt for some reason. I rebuilt the table from scratch, and this time included an indexed sequnece number. I loaded the table with a million records, and tried updates and deletes. It is still giving me the timeout error.

nikotromus





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 dhara_adh SQL Server 2000 4 December 22nd, 2006 04:18 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.