Solved

Microsoft OLE DB Provider for SQL Server error '80040e31'  Timeout expired (Unrelated to Connection or ASP script Timeout Properties)

Posted on 2003-12-03
10
12,177 Views
Last Modified: 2011-09-20
Currently facing a very strange problem. What ever i do to the database or the record, the sql server always timeout at a particular point. if i change the content of the particular record, the problem still arise. Not sure what is the problem. May it be related to database? is the data corrupted? currently my suspicions is this. Need desperate help. But for your info my script does a batch update on all the records, so it opens quite a lot of connection. Didnt want to convert the whole thing to stored procedure because of the logic complexity. Have turned part of logic into stored procedure, but results still timeout at the same place. Need help. URGENT
0
Comment
Question by:alcatraz_437
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 8

Expert Comment

by:dishanf
ID: 9865916
When the timeout occers , whats the error it apper?? on web page. If the Query take long time to execute, you must increase to db timeout time in iis or what ever.
0
 

Author Comment

by:alcatraz_437
ID: 9865968
dishanf
   As i have stated in the question, that this has nothing to do with sql server time out or the iis timeout, cause it hits at a particular part of the database only. Have tried increasing connection timeout and iis timeout both have failed.. ! :)
0
 
LVL 8

Expert Comment

by:dishanf
ID: 9866001
Sorry . I dont know asp much... leave it to other experts
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 18

Expert Comment

by:ShogunWade
ID: 9866301
you say it times out at a particular point.... can you tell us what it is actually attempting to do at that particular point, otherwise we are a bit in the dark here.
0
 

Author Comment

by:alcatraz_437
ID: 9866317
it times out at a normal update command. There is no problem with this update command, since it is already executed a few thousand times before it was executed at the particular point. On top of that, i have tried running the sql update command in the query analyser and it works just fine.
0
 
LVL 18

Assisted Solution

by:ShogunWade
ShogunWade earned 200 total points
ID: 9866431
Is there an open transaction on the table causing an indefinate lock ?
0
 
LVL 34

Accepted Solution

by:
arbert earned 300 total points
ID: 9872512
Agree with ShogunWade--when you receive the error, run SP_WHO in query analyzer and see if there is any blocking.  Sounds like one or your previous transactions is blocking....
0
 

Author Comment

by:alcatraz_437
ID: 9873192
Thanx, found out that while doing a select statement on a table, i update on the same table simultaneously, so there is a point where the select statement locks a record the update statement wishes to update. So to rectify this, place the results that need to be updated at a temp table, then once the select statement is finish, run thru the temp table to update the necessary records.

Thanx a million.
0
 
LVL 34

Expert Comment

by:arbert
ID: 9874538
You can also add the WITH (NOLOCK) after the table name on your select statement to not take a lock.  There IS the possibility you will read dirty data, but it's and option....
0
 

Author Comment

by:alcatraz_437
ID: 9881739
Thanx a lot arbert!!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sql server function help 15 27
create an aggregate function 9 31
insert wont work in SQL 14 17
optimize stored procedure 6 23
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now