Subject Re: [firebird-support] lock conflict on no wait transaction - finding the user
Author Thomas Steinmaurer
> Is there something I can do to find out which user is locking a particular
> record in a database? If I can use the transaction number to lookup the
> user, then I may be able to simply ask that user to re-start his machine?
> The server is running Firebird Superserver 2.1.4 on Windows.
>
> I am trying to delete some records in a table but the following message is
> displayed:
>
> "lock conflict on no wait transaction deadlock update conflicts with
> concurrent update concurrent transaction number is 7850179"

If your database has an ODS of at least 11.1, then you can do:

select
a.*
, t.*
from
mon$transactions t join mon$attachments a on (t.mon$attachment_id =
a.mon$attachment_id)
where
mon$transaction_id = 7850179


This will give the transaction and attachment information for this
particular transaction id.

You can also look up the statements associated to this transaction id by
executing:


select * from mon$statements where mon$transaction_id = 7850179

> I cannot shutdown and restart the database at the moment, as it is during
> production hours.

It shouldn't be necessary. It's also possible to kill a particular
statement by executing a DELETE statement on the MON$STATEMENTS table.


--
With regards,
Thomas Steinmaurer (^TS^)
Firebird Technology Evangelist

http://www.upscene.com/

Do you care about the future of Firebird? Join the Firebird Foundation:
http://www.firebirdsql.org/en/firebird-foundation/

> Regards
> Marius J. Labuschagne
> N Dip CDP, B Com (Strategy and IT), IMM Marketing, PPIM, PRINCE2 Certified
>
> Turnkey Information Systems cc