473,774 Members | 2,275 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Deadlock or Timeout when delete/update rows with BLOB

Ray
I am having my first experience using BLOB as a row in a table. I am
using it to insert graphics for labels we print. I have no problem
inserting into and select from the table. The graphic is being stored
correctly.

Whenever I attempt to delete a row from my application I get the
following error.
SQL0911N The current transaction has been rolled back because of a
deadlock or timeout. Reason code "68". SQLSTATE=40001

I know the row is not locked as only I have access to this development
database.

Also when I attempt to update a row within the table (even to jsut
alter the NAME row that is only characters) the update always fails but
my application will return true as if the update was a success. When I
check the row via the CLP the old name is still there.

Am I missing something with working with BLOBs?
Thanks,
Ray

Nov 12 '05 #1
3 3627
"Ray" <br****@lsmp.co m> wrote in message
news:11******** *************@g 49g2000cwa.goog legroups.com...
I am having my first experience using BLOB as a row in a table. I am
using it to insert graphics for labels we print. I have no problem
inserting into and select from the table. The graphic is being stored
correctly.

Whenever I attempt to delete a row from my application I get the
following error.
SQL0911N The current transaction has been rolled back because of a
deadlock or timeout. Reason code "68". SQLSTATE=40001

I know the row is not locked as only I have access to this development
database.

Also when I attempt to update a row within the table (even to jsut
alter the NAME row that is only characters) the update always fails but
my application will return true as if the update was a success. When I
check the row via the CLP the old name is still there.

Am I missing something with working with BLOBs?
Thanks,
Ray

Do a:
db2 list applications show detail
to see if there are other connections.
Do a snapshot before locks right before and right after the update. If you
cannot figure it out, post the results of the above on this forum.
Nov 12 '05 #2
This is crude and I don't recommend it and I know little about DB2.
That being said ...

You could try updating the record with a an empty BLOB and then
deleting it.

Nov 12 '05 #3
Ray
I did the snapshot for the row locking and something strange is
happening. It looks like the row is being locked but after the update
the lock is lost and the commit is doing nothing.
For all my other tables I get the following:
After the lock but before the update I have two locks on the table (U,
IX)
After the update but before the commit I have two locks (X,IX)
After the commit all locks are released. With this table and the BLOB I
am getting distinctly different results. I can post a log of a basic
lock,update, commit for a table I know works if that would help.

Here is a snapshot right after I selected the row for update on the
BLOB table. At this point it is locked and not updated.
---------BEGIN SNAPSHOT
Database Lock Snapshot

Database name = LSMPDEV

Database path = C:\DB2\NODE0000 \SQL00003\

Input database alias = LSMPDEV

Locks held = 18
Applications currently connected = 3
Agents currently waiting on locks = 0
Snapshot timestamp = 05-12-2005 09:43:46.855278

Application handle = 265
Application ID = C0A80178.870B.0 50512140954
Sequence number = 0001
Application name = db2bp.exe
Authorization ID = ADMINISTRATOR
Application status = UOW Waiting
Status change time = Not Collected
Application code page = 1252
Locks held = 0
Total wait time (ms) = Not Collected
Application handle = 63
Application ID = C0A80178.4D0C.0 50512144543
Sequence number = 0001
Application name = omnis.exe
Authorization ID = RAY
Application status = UOW Waiting
Status change time = Not Collected
Application code page = 1252
Locks held = 9
Total wait time (ms) = Not Collected

List Of Locks
Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal P Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO

Lock Object Name = 4
Node number lock is held at = 0
Object Type = Row
Tablespace Name = USERSPACE1
Table Schema = ADMINISTRATOR
Table Name = LABEL_GRAPHIC
Mode = NS
Status = Granted
Lock Escalation = NO

Lock Object Name = 121
Node number lock is held at = 0
Object Type = Table
Tablespace Name = USERSPACE1
Table Schema = ADMINISTRATOR
Table Name = LABEL_GRAPHIC
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal V Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal P Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO
Application handle = 281
Application ID = C0A80178.4F0C.0 50512144545
Sequence number = 0001
Application name = omnis.exe
Authorization ID = RAY
Application status = UOW Waiting
Status change time = Not Collected
Application code page = 1252
Locks held = 9
Total wait time (ms) = Not Collected

List Of Locks
Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal P Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO

Lock Object Name = 4
Node number lock is held at = 0
Object Type = Row
Tablespace Name = USERSPACE1
Table Schema = ADMINISTRATOR
Table Name = LABEL_GRAPHIC
Mode = U
Status = Granted
Lock Escalation = NO

Lock Object Name = 121
Node number lock is held at = 0
Object Type = Table
Tablespace Name = USERSPACE1
Table Schema = ADMINISTRATOR
Table Name = LABEL_GRAPHIC
Mode = IX
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal V Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal P Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO
--------END SNAPSHOT

And here is the snapshot after I have updated but before a commit has
been issued.
As you can see the locks have been lost for the application ID even
though a commit has not been issued. I am lost.
----BEGIN SNAPSHOT

Database Lock Snapshot

Database name = LSMPDEV
Database path = C:\DB2\NODE0000 \SQL00003\
Input database alias = LSMPDEV
Locks held = 9
Applications currently connected = 3
Agents currently waiting on locks = 0
Snapshot timestamp = 05-12-2005 09:43:58.549061

Application handle = 265
Application ID = C0A80178.870B.0 50512140954
Sequence number = 0001
Application name = db2bp.exe
Authorization ID = ADMINISTRATOR
Application status = UOW Waiting
Status change time = Not Collected
Application code page = 1252
Locks held = 0
Total wait time (ms) = Not Collected
Application handle = 63
Application ID = C0A80178.4D0C.0 50512144543
Sequence number = 0001
Application name = omnis.exe
Authorization ID = RAY
Application status = UOW Waiting
Status change time = Not Collected
Application code page = 1252
Locks held = 9
Total wait time (ms) = Not Collected

List Of Locks
Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal P Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal L Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO

Lock Object Name = 4
Node number lock is held at = 0
Object Type = Row
Tablespace Name = USERSPACE1
Table Schema = ADMINISTRATOR
Table Name = LABEL_GRAPHIC
Mode = NS
Status = Granted
Lock Escalation = NO

Lock Object Name = 121
Node number lock is held at = 0
Object Type = Table
Tablespace Name = USERSPACE1
Table Schema = ADMINISTRATOR
Table Name = LABEL_GRAPHIC
Mode = IS
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal V Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO

Lock Object Name = 0
Node number lock is held at = 0
Object Type = Internal P Lock
Tablespace Name =
Table Schema =
Table Name =
Mode = S
Status = Granted
Lock Escalation = NO
Application handle = 281
Application ID = C0A80178.4F0C.0 50512144545
Sequence number = 0001
Application name = omnis.exe
Authorization ID = RAY
Application status = UOW Waiting
Status change time = Not Collected
Application code page = 1252
Locks held = 0
Total wait time (ms) = Not Collected

---END SNAPSHOT.

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
6433
by: Anita | last post by:
Hi All, Can multiple updates on one table using single query generate deadlock ? For example, at the same time, there are 2 users run 2 queries as follows : User1 runs : update tab1 set tab1.v = tab1.v + 1 from tab1 inner join tab2 on tab1.no = tab2.no
7
9227
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 a table (c) re-queries another table using a subquery which references the inserted table (correlated or not)
8
9551
by: Javauser | last post by:
Hi there we are getting the following db2 error on executeBatch() method that inserts n rows on a table (where n is between 50 and 200). SQL0911N The current transaction has been rolled back because of a deadlock or timeout. Reason code "2". SQLSTATE=40001 errorCode : 911
11
14077
by: EoRaptor | last post by:
I`m exporting data from many Lotus Notes databases to a DB2 database using LotusScript. The LotusScript agents commit after EACH update/insert. Nevertheless, I keep getting transaction rollbacks on deadlock or timeout. When I get a snapshot for locks, I see that one of the export agents is getting a table lock rather than a row lock. I`m guessing this is what causes the time out. Questions: how do I determine whether it`s a deadlock or a...
3
7628
by: Nigel Robbins | last post by:
Hi There, I'm getting a deadlock when I have two clients running the following statement. DELETE FROM intermediate.file_os_details WHERE file_uid = ? AND obj_uid There is a compound index on file_uid / obj_uid. The isolation level is UR and I have set DB2_RR_TO_RS=YES. Any thoughts why I'm getting the deadlock ?
15
10002
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) 3-4 times and give up if after that it's still in deadlock. I'm very sure that many experienced people out there already deal with this issue somehow. Is there an alternative to it? Thanks for your comments and suggestions.
4
9620
by: fmatamoros | last post by:
I sometimes get the following error from an update statement in a stored procedure: Transaction (Process ID 62) was deadlocked on thread | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. The isolation level is READ UNCOMMITTED and there are no explicit transactions in the stored procedure. The update statement is as follows:
0
11702
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 java.sql.SQLException: Deadlock found when trying to get lock; Try restarting transaction message from server: "Lock wait timeout exceeded; try restarting transaction"; We get such errors generally on inserts or updates while applying a
0
1953
by: halex | last post by:
Hello, I am having deadlock problem when I have a lot of visitors on my website at the same time. I am using NetTiers templates to generate C# classes for accessing DB layer and problem is in my custom Store Procedure. I have Article table and ArticleLanguage table. One record from Article (Id, Position, StatusId) table is the same for all languages and in ArticleLanguage (Id, LanguageId, ArticleId, Name) table I have only article names...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.