473,394 Members | 1,718 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,394 software developers and data experts.

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 3575
"Ray" <br****@lsmp.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.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.050512140954
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.050512144543
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.050512144545
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.050512140954
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.050512144543
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.050512144545
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
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...
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...
8
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...
11
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...
3
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...
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)...
4
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...
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: 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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.