473,320 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Specific deadlock problem

I have been handed an Excel document-program-thing to work with, which saves and loads its data to a MS SQL database. Seeing how I am not an expert on either Excel or databases, I have been having a bit of a bother with a deadlock problem that occurs when two users save their data to the database at the same time. To be honest I don't see how the code for saving to the database can result in a deadlock.

I won't post the entire part of code, because it's long, but I can describe its structure. It consists of many (perhaps 30) simple UPDATE statements of various length, updating perhaps 5 to 20 fields each in different (perhaps 15) single tables. The updates are made in table-order, so that if one table is updated with several UPDATE statements they all come one after another. No explicit transactions are used.

If two users run this code, sending the sequence of UPDATE statements to the database, how can it result in a deadlock? Because it does, and from what I have seen, it does so every time I start two save processes simultaneously. Obviously I have not understood well enough the nature of deadlocks and when they occur.

I have noticed that some table lack proper indexes or key fields, can such shortcomings result in deadlocks? Overall the database is of a poor relational design.

If anyone have an idea of what I could look at, I would be very happy to hear it. Because I have run out of things to try myself.

Thank-you.
May 3 '07 #1
0 840

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Duncan Grisby | last post by:
Hi, Does anyone know of a deadlock detector for Python? I don't think it would be too hard to hook into the threading module and instrument mutexes so they can be tested for deadlocks. I've...
7
by: Andrew Mayo | last post by:
Here's a really weird one for any SQL Server gurus out there... We have observed (SQL Server 2000) scenarios where a stored procedure which (a) begins a transaction (b) inserts some rows into...
1
by: debian mojo | last post by:
Hello faculties, i'm encountering a strange a deadlock problem on my remote server which is used to give application demo to the client. It has happened that on one of the databases a deadlock...
1
by: Rohit Raghuwanshi | last post by:
Hello all, we are running a delphi application with DB2 V8.01 which is causing deadlocks when rows are being inserted into a table. Attaching the Event Monitor Log (DEADLOCKS WITH DETAILS) here....
8
by: mk | last post by:
You probably suspect the answer, typically its 'yes' deadlock can occur in any multithreaded application. Even ones that employ static members. Commonly it occurs when more than one thread tries...
15
by: Zeng | last post by:
Hi, The bigger my C# web-application gets, the more places I need to put in the tedious retrying block of code to make sure operations that can run into database deadlocks are re-run (retried)...
1
by: Grant McLean | last post by:
Hi First a simple question ... I have a table "access_log" that has foreign keys "app_id" and "app_user_id" that reference the "application_type" and "app_user" tables. When I insert into...
2
by: Sumanth | last post by:
Hi , I am trying to acquire a lock on a table A in exclusive mode, and this statement gives an error indicating a deadlock or timeout has been detected. The lock timeout value is set to 0 which...
0
by: cwho.work | last post by:
Hi! We are using apache ibatis with our MySQL 5.0 database (using innodb tables), in our web application running on Tomcat 5. Recently we started getting a number of errors relating to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.