Thread: Deadlock
View Single Post

   
  #2 (permalink)  
Old 02-27-2008, 07:04 AM
Mark A
 
Posts: n/a
Default Re: Deadlock

"RZ" <zyry@wp.pl> wrote in message news:dssl4v$4rr$1@news.onet.pl...
> Hi.
> I have a few instances of same java application working concurrent on DB2
> v8.2. All of them:
> - has a transaction isolation level set to TRANSACTION_READ_UNCOMMITTED, -
> try to insert into same table T1,
> - resolves triggers:
> - BEFORE INSERT ON T1,
> - AFTER INSERT ON T1
> which selects from table T2.
>
> In all, except one, occurred an exception with: SQLCODE: 911, SQLSTATE:
> 40001, SQLERRMC: 2. When I give up with select statement in triggers,
> applications seems to work fine.
>
> Can someone explain why the deadlock occurs with transaction isolation
> level set to TRANSACTION_READ_UNCOMMITTED and how to solve the problem.
>
> Regards,
>
> Rafał


The transaction isolation level in DB2 only affects share (select) locks. It
does not affect locks that are taken as a result of insert, update, delete,
or select for update.

Try setting this instance parameter (probably requires instance stop and
start). I think you need FP9 or higher, but not sure.

db2set DB2_SKIPINSERTED=ON


Reply With Quote