Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Recover After Crash

Re: Recover After Crash

From: Michael Kluev <kluev_at_stalker.gamma.-deIete-.ru>
Date: Wed, 13 Sep 2000 23:34:42 +0400
Message-ID: <kluev-1309002334420001@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 - 14:34:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US