Subject | RE: [firebird-support] Deadlock when 2 session update the same 01 row |
---|---|
Author | Nguyen Dang Quang |
Post date | 2012-11-27T10:25:27Z |
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,
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Svein Erling Tysvær
Sent: Tuesday, November 27, 2012 4:07 PM
To: 'firebird-support@yahoogroups.com'
Subject: RE: [firebird-support] Deadlock when 2 session update the same 01
row
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
behave.
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.
HTH,
Set
[Non-text portions of this message have been removed]
I am using VS2005 (FirebirdSqk,Data.FirebirdClient), how can I change
behavior of the Database the same as in Oracle?
Best Regards,
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Svein Erling Tysvær
Sent: Tuesday, November 27, 2012 4:07 PM
To: 'firebird-support@yahoogroups.com'
Subject: RE: [firebird-support] Deadlock when 2 session update the same 01
row
>I am newbie to Firebird, I am working on Oracle and porting a small moduleto Firebird. We
>face with very strang problem:first, and while A
>
>When session A and B update a row in a table at the same time. If A goes
>does not commit or rollback yet, B will update the same row. In Oracle, Bwill be blocked
>until A commit or rollback without any error. But In Firebird, B will getDeadlock
>immediately.Hi and welcome, Nguyen!
>
>Can I config FB to do exactly like Oracle does? Or, It is a bug?
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
behave.
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.
HTH,
Set
[Non-text portions of this message have been removed]