Subject Re: [firebird-support] Unlock record
Author Eduardo
I am still trying to find a way to unlock a record when the PC that locked it (using SELECT ... WITH LOCK) "hanged"...

I thought the following:

The user who executed the SELECT ... WITH LOCK started a transaction. When his PC "hanged", this transaction remains active.

Is there a way to identify this transaction and rollback it? May be deleting or modifying something in a MON$ table or in another way?

-------- Mensaje original --------
Asunto: Re: [firebird-support] Unlock record
De: Eduardo <gusedum@...>
Para: firebird-support@yahoogroups.com
Fecha: 02/02/2015 17:28
Thank you for your answer.

I agree with you. Firebird should allow for all/any attachment to be deleted.

Closing the application to unlock the record is not the solution I am looking for. My problem is when there are many users using the application, then one of them "hangs" his PC with a record locked and then the only way to unlock it, is to tell every user to close the application and reinitiate Firebird service which is a very "uncomfortable" solution.

-------- Mensaje original --------
Asunto: Re: [firebird-support] Unlock record
De: 'Leyne, Sean' Sean@... [firebird-support] <firebird-support@yahoogroups.com>
Para: firebird-support@yahoogroups.com <firebird-support@yahoogroups.com>
Fecha: 02/02/2015 14:49
 

Eduardo,

> I add some information to my previous mail. When I try to delete the record
> of MON$ATTACHMENTS, the complete message I got is the following:
>
> SQL ERROR CODE:-817
>
> SQL ERROR MESSAGE:
> The insert, update, delete, ddl or authorization statement cannot
>  be executed because the transaction is inquiry only

It seems that monitoring table functions do not allow for "read-only" attachments to be deleted/killed.

Very interesting.

1- The fact that the "WITH LOCK" option was used makes what otherwise should be a simple SELECT statement much more significant, but the message suggest that read-only statements should be ignored (although supported WITH LOCK is very uncommon usage, so may not have been considered)

2- IMO, the functionality should allow for all/any attachment to be deleted. The purpose of the feature is to all such attachments to be managed in such a fashion -- there should be no restrictions.

> Any other idea to unlock a record?

Close have your application commit transaction or close your application.

Sean






El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
www.avast.com