If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 deadlock

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-06-10, 04:44
qxz qxz is offline
Registered User
 
Join Date: Apr 2002
Posts: 84
Question DB2 deadlock

Dear All,

We encountered this issue suddenly with the following error message:

com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE -911, SQLSTATE: 40001, SQLERRMC: 68

The application was working fine before. Could it due to the corruption of index on the tables. I'd appreciate if there is any hint.


Thanks,
qxz
Reply With Quote
  #2 (permalink)  
Old 01-06-10, 07:00
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
This is not a deadlock, but a lock timeout. I would start with looking at the lock snapshot to determine what statements and database objects are involved.
Reply With Quote
  #3 (permalink)  
Old 01-08-10, 02:56
qxz qxz is offline
Registered User
 
Join Date: Apr 2002
Posts: 84
Sorry that I am not a DBA. How to run the lock snapshot in DB2 8? Will it affect the performance of the database server?

Thanks!


Quote:
Originally Posted by n_i View Post
This is not a deadlock, but a lock timeout. I would start with looking at the lock snapshot to determine what statements and database objects are involved.
Reply With Quote
  #4 (permalink)  
Old 01-08-10, 06:58
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by qxz View Post
Sorry that I am not a DBA.
Some folks would see it as a good thing


Quote:
Originally Posted by qxz View Post
How to run the lock snapshot in DB2 8? Will it affect the performance of the database server?
Log in to the server as the DB2 instance owner. Issue "db2 update monitor switches using lock on statement on uow on timestamp on". For locks, issue "db2 get snapshot for locks on <database name>". For statements, "db2 get snapshot for dynamic sql on <database name>". Take snapshots periodically, redirecting results to a text file, until you catch the lock wait that times out.

Having snapshot monitor elements turned on does affect performance a little bit (general estimate is about 5% if all switches are on), but it's the only way to obtain diagnostic information.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On