Subject RE: [firebird-support] Deadlock when 2 session update the same 01 row
Author Nguyen Dang Quang
Thanks for your reply,

I am using VS2005 (FirebirdSqk,Data.FirebirdClient), how can I change
behavior of the Database the same as in Oracle?

Best Regards,

[] On Behalf Of Svein Erling Tysvær
Sent: Tuesday, November 27, 2012 4:07 PM
To: ''
Subject: RE: [firebird-support] Deadlock when 2 session update the same 01

>I am newbie to Firebird, I am working on Oracle and porting a small module
to Firebird. We
>face with very strang problem:
>When session A and B update a row in a table at the same time. If A goes
first, and while A
>does not commit or rollback yet, B will update the same row. In Oracle, B
will be blocked
>until A commit or rollback without any error. But In Firebird, B will get
>Can I config FB to do exactly like Oracle does? Or, It is a bug?

Hi and welcome, Nguyen!

No, it is no bug. This is called 'lock resolution' and belongs to your
transactions (strictly speaking, this is a lock conflict, not a deadlock).
So, you could have isc_tpb_nowait on transaction A and isc_tpb_wait on
transaction B and then transaction A would behave like you report your
system is doing, whilst transaction B would behave as you would like it to

How to set these things depend on what kind of components you use. Using IB
Objects, I would simply set TIB_Transaction.LockWait to true (though I've
never actually done this myself), other components will have different ways
of doing this.


[Non-text portions of this message have been removed]