Subject IB Deadlock.
Author Alessandro Ortuso
Hi!

We have a quite big application that has this situation:

Program A inserts a number of records in the table T1 and a trigger on
the
AfterInsert update a value on the table T2 refering to the T1 record
Program B does about the same operations


These programs run at the same times in a transaction so the program B
could insert records in T1 (and updating the refering record in T2) that
are already modified from program A.
This is a tipical deadlock situation as A cannot insert in T1 as is
waiting
for B to finish and the same B for A.

How do you solve this problem?

Do you rollback program A so B can continue?

Do you have any other ideas?

TIA,
Alessandro