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

Help in gathering deadlock information


I'm trying to assist in analyzing a deadlock situation that sometimes occurs on a UDB/AIX system.
We have several java applications that connect via jdbc contending for a workflow table on the
server. Under certain conditions this leads to some threads deadlocking, and a resulting -911 from
the UDB deadlock detector. (UDB 8.2 on AIX 5.3)

Via db2monitor, and event monitor (for Statements, Transactions, and Deadlock with details), we have
been able to narrow it down to row-level contention between Insert/Select. (Lock types W & NS with a
type-2 index on primary key). The Deadlocked Connection record provides info on lock type, object
name, and RID, and the Statement record shows some of the dynamic SQL statement text. But still a
few key bits are ambiguous, and I'm not sure how to collect them. Namely:

1) How to fetch row info via RID in LUW?
We need to see the row contents for the RID listed in the lock object, but how?

For DB2 UDB v8 for z/OS one could use direct row access:
..where ID = ROWID(X'023C1F');
or maybe ..SQL TYPE IS ROWID my_rid;

But I don't find anything like this in UDB v8 for LUW..?
How can we do this with SQL?
2) How to find the actual values used by the deadlocked threads?

From the statement event info we can see SQL text, but with only parameter markers (?).
ie. INSERT INTO DSC.UT_LOCK (IDENT, KONTEXT, FK_BENUTZER, LETZTEMUTATION) VALUES ?, ?, ?, DEFAULT)
We need to see the actual host variable values to determine what was happening here. I didn't find
any SQLDA/SQLVAR info in the statement or transaction record..? Are these captured by the event
monitor?

I've asked the developers to try to dump info for both these items in a java exception handler
for the -911 event, but I'd prefer to get it from UDB directly if possible. Anyone have some
suggestions for filling in these blank spots?
Merci,
Eric
Nov 12 '05 #1
2 2205
Eric.Jones wrote:

I'm trying to assist in analyzing a deadlock situation that sometimes
occurs on a UDB/AIX system.
We have several java applications that connect via jdbc contending for a
workflow table on the
server. Under certain conditions this leads to some threads deadlocking,
and a resulting -911 from
the UDB deadlock detector. (UDB 8.2 on AIX 5.3)

Via db2monitor, and event monitor (for Statements, Transactions, and
Deadlock with details), we have
been able to narrow it down to row-level contention between
Insert/Select. (Lock types W & NS with a
type-2 index on primary key). The Deadlocked Connection record provides
info on lock type, object
name, and RID, and the Statement record shows some of the dynamic SQL
statement text. But still a
few key bits are ambiguous, and I'm not sure how to collect them. Namely:

1) How to fetch row info via RID in LUW?
We need to see the row contents for the RID listed in the lock object,
but how?

For DB2 UDB v8 for z/OS one could use direct row access:
..where ID = ROWID(X'023C1F');
or maybe ..SQL TYPE IS ROWID my_rid;

But I don't find anything like this in UDB v8 for LUW..?
How can we do this with SQL?
2) How to find the actual values used by the deadlocked threads?

From the statement event info we can see SQL text, but with only
parameter markers (?).
ie. INSERT INTO DSC.UT_LOCK (IDENT, KONTEXT, FK_BENUTZER,
LETZTEMUTATION) VALUES ?, ?, ?, DEFAULT)
We need to see the actual host variable values to determine what was
happening here. I didn't find
any SQLDA/SQLVAR info in the statement or transaction record..? Are
these captured by the event
monitor?

I've asked the developers to try to dump info for both these items in a
java exception handler
for the -911 event, but I'd prefer to get it from UDB directly if
possible. Anyone have some
suggestions for filling in these blank spots?
Merci,
Eric

Can you forward me data collected so far?

Use rhis e-mail address:

jasinet at attglobal dot net
Jan M. Nelken
Nov 12 '05 #2
Eric.Jones wrote:

I'm trying to assist in analyzing a deadlock situation that sometimes
occurs on a UDB/AIX system.
We have several java applications that connect via jdbc contending for a
workflow table on the
server. Under certain conditions this leads to some threads deadlocking,
and a resulting -911 from
the UDB deadlock detector. (UDB 8.2 on AIX 5.3)

Via db2monitor, and event monitor (for Statements, Transactions, and
Deadlock with details), we have
been able to narrow it down to row-level contention between
Insert/Select. (Lock types W & NS with a
type-2 index on primary key). The Deadlocked Connection record provides
info on lock type, object
name, and RID, and the Statement record shows some of the dynamic SQL
statement text. But still a
few key bits are ambiguous, and I'm not sure how to collect them. Namely:

1) How to fetch row info via RID in LUW?
We need to see the row contents for the RID listed in the lock object,
but how?

For DB2 UDB v8 for z/OS one could use direct row access:
..where ID = ROWID(X'023C1F');
or maybe ..SQL TYPE IS ROWID my_rid;

But I don't find anything like this in UDB v8 for LUW..?
How can we do this with SQL?
2) How to find the actual values used by the deadlocked threads?

From the statement event info we can see SQL text, but with only
parameter markers (?).
ie. INSERT INTO DSC.UT_LOCK (IDENT, KONTEXT, FK_BENUTZER,
LETZTEMUTATION) VALUES ?, ?, ?, DEFAULT)
We need to see the actual host variable values to determine what was
happening here. I didn't find
any SQLDA/SQLVAR info in the statement or transaction record..? Are
these captured by the event
monitor?

I've asked the developers to try to dump info for both these items in a
java exception handler
for the -911 event, but I'd prefer to get it from UDB directly if
possible. Anyone have some
suggestions for filling in these blank spots?
Merci,
Eric


Can you forward me data collected so far?

Use rhis e-mail address:

jasinek at attglobal dot net
Jan M. Nelken
Nov 12 '05 #3

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

Similar topics

1
by: Steve Thorpe | last post by:
Hi I have a deadlock situation and I am trying to debug my Trace Log. How do I find out what is the cause ? I can see from the trace I have an exclusive lock on a RID, but how can I find out...
1
by: Scot Schneider | last post by:
I am getting quite a few deadlock errors where both sessions are trying to execute sp_execsql according to the the trace information in the error log (see below). The database is being asscessed...
5
by: drdeadpan | last post by:
I asked the DBA to start the Server with options -T1204 and -T3605 and here's what I get. I need help deciphering this. This happens when we have 5 usrs performing concurrent actions and for the...
6
by: Todd McNeill | last post by:
Hi- We ran into some very strange deadlocks this AM, and I was hoping to get some insight. We were running a REORGCHK on a database, and started getting deadlocks. What is curious is that...
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: Madhu Gopinathan | last post by:
Hi All, I am faced with a horrible hang problem. I have a COM exe server that executes some tasks. The task execution manager is a thread that manages the pool of threads, which is 4 per processor....
5
by: Matik | last post by:
Hello, I've very often a deadlock problem. The deadlock is generated always in the same way, by one application calling in DB two sp's (application has two threads). This is an error message...
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...
53
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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.