Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Recover After Crash
> > [Locking under Oracle crashsafe]
>> "select DOC_ID from DOCUMENT where DOC_ID = xxx for
>> update nowait"
> This means that transaction should be opened for the whole
> period when user works with document - it could be hours.
Where is the problem?
> 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.
This depends on the isolation level you are using. "Read Committed" is what you should be using. In this case only committed data is seen by other people.
There is some good information on isolation levels in the Oracle documentation. Search for "phantom".
If you consider an open transaction a bad idea:
- Let the user insert a dataset into a timestamp table on the server. - Select Sequence.currval to get the pkey of this dataset. - Use this pkey to identify the lock on DOCUMENT - Write some "High I am still there" information back to the server inwhatever time interval.
You can also use Oracles proprietary Connection-ID but I am sorry not to have this at hand.
HTH.
Regards,
Carl
-- Carl Rosenberger db4o - database for objects - http://www.db4o.comReceived on Wed Sep 13 2000 - 16:51:36 CDT
![]() |
![]() |