Subject | Re: [firebird-support] Unlock record |
---|---|
Author | Eduardo |
Post date | 2015-01-23T14:42:26Z |
I saw the same as you, and made the following test:
- Opened my application.
- Executed the option which locks a record (executes a SELECT * FROM TABLE1 WHERE (FIELD1 = 'some value') WITH LOCK).
- Opened the database with IB_SQL.
- Looked in table MON$STATEMENTS. I found many records. Many of them with MON$SQL_TEXT null. Only one of them had MON$TIMESTAMP not null.
- I deleted the only record with MON$TIMESTAMP not null.
- I opened another instance of IB_SQL and verified that the record I locked at the first step was still locked.
Am I undestanding something wrong or this doesn´t work?
Another idea to manually unlock a record?
Regards
Eduardo
Asunto: Re: [firebird-support] Unlock record
De: 'Walter R. Ojeda Valiente' sistemas2000profesional@... [firebird-support] <firebird-support@yahoogroups.com>
Para: firebird-support@yahoogroups.com
Fecha: 23/01/2015 11:13
Hmmmmm, maybe I am doing something wrong, but....
- I open 2 instances of ISQL.EXE
- In ISQL1 I write: SELECT * FROM CLIENTS;
- In ISQL2 I write: SELECT MON$TIMESTAMP, MON$TRANSACTION_ID FROM MON$STATEMENTS;
- In ISQL1 I write: COMMIT;
- In ISQL2 I write: SELECT MON$TIMESTAMP, MON$TRANSACTION_ID FROM MON$STATEMENTS;
- In ISQL1 I write: SELECT * FROM CLIENTS;
- In ISQL2 I write: SELECT MON$TIMESTAMP, MON$TRANSACTION_ID FROM MON$STATEMENTS;
In all cases, ISQL2 shows me the same data, nothing change. So I can not see the transaction's timestamp or Id of the transactions started by ISQL1.
ISQL2 absolutly ignores that happens in the ISQL1 instance.
Is there a way to know in ISQL2 the transaction's data started by ISQL1?
Version 2.5.2, SuperServer, Windows 7
Greetings.
Walter.
On Thu, Jan 22, 2015 at 1:50 PM, Svein Erling Tysvær svein.erling.tysvaer@... [firebird-support] <firebird-support@yahoogroups.com> wrote:
>I looked in a database, and in MON$STATEMENTS tabla I have the following fields:
MON$STATEMENT_ID
MON$ATTACHMENT_ID
MON$TRANSACTION_ID
MON$STATE
MON$TIMESTAMP
MON$SQL_TEXT
MON$STAT_ID
>How can I detect which is the record I have to delete to unlock my record? This is the only table I have to modify?
I typically just look at the mon$sql_text with a mon$timestamp that seems to be the correct one.
HTH, Set
-------- Mensaje original -------
>> May be I can modify or delete some record in any MON$ table or do some other thing?
>I typically locate and delete records from MON$STATEMENTS. Mind you, that is 2.5 and typically when I have a long-
>running query. Don't know whether deleting from this table is possible or safe with 2.1 or sensible WITH LOCK.
![]()
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
www.avast.com