Subject Re: [firebird-support] Resolving Lock conflicts on the Firebird server
Author Helen Borrie
At 10:12 PM 7/03/2006, you wrote:
>Every now and then our Delphi 7 app, running against a FB 1.5.x server
>decides to throw a lock conflict at the users, up till now the
>solution has been for all the users to log out one by one untill the
>lock is released and then they can all carry on again, bit of a pain
>when 70 users plus are logged in.

I'm trying to digest this.


>Is there a way of asking the server what lock conflicts are active and
>which connections caused them?

A lock conflict is the *designed* behaviour whenever one transaction
tries to post a change to a row that conflicts with another user's
change to that row.

>would make my life very easy then to tell the locking connection to
>save / abort.

A lock conflict is "personal" to the transaction that encounters
it. Your user application should be written to catch the exception
that the engine returns to the application, and provide a handler for it.

It's not the "locking connection" that should "save/abort", it's the
one that gets the exception that should take some action. What that
action should be depends on three things, first: what you as the
application developer want to allow; second: how you as the
application developer have configured the transaction; third: what
you as the application developer have provided to handle the
particular locking conflict that occurs (there are several different kinds!)

Shutting down the system is one way to resolve lock conflicts, just
as burning the house down is one way to avoid cleaning the windows.

./heLen