Re: Recover After Crash
Date: Wed, 13 Sep 2000 23:34:42 +0400
Message-ID: <kluev-1309002334420001_at_node9.stalker.gamma.ru>
In article <8poia8$6lk$17$1_at_news.t-online.com>, "Carl Rosenberger" <carl_at_db4o.com> wrote:
> [Locking under Oracle crashsafe]
> > update DOCUMENT set STATUS=1 where DOC_ID=xxx
> > - to lock xxx document
>
> A possible solution (pseudocode):
>
> Statement = "select DOC_ID from DOCUMENT where DOC_ID = xxx for update
> nowait"
> Declare Cursor
> Prepare Cursor from Statement using Transaction
> Open Cursor
> Fetch Cursor
> Close Cursor
>
> The record should be locked until the Transaction commits, rollbacks or
> disconnects.
This means that transaction should be opened for the whole period when user works with document - it could be hours. I guess, this is not "good thing" to have transaction opened for so long. If I will modify other tables/rows of this table (while having transaction is opened), will my modifications be seen by elsewhom? I think not - this is not appropriate.
-- Michael Kluev. PS. Remove "-delete-." part from my address to reply.Received on Wed Sep 13 2000 - 21:34:42 CEST