Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Which transaction isolation level can prevent lost updates?
Hello there,
I am working on a multi-tier project, using Oracle 8i. My data layer consists of container-managed entity java beans, which means that I don't have direct control over which SQL statements are being generated, hence I cannot force X-locks via dummy-updates, nor by invoking SELECT FOR UPDATE. What I can do is to set the isolation level for the transactions my entity beans will execute within. Which transaction isolation level is necessary to prevent lost updates:
trans 1: trans 2:
begin;
begin;
select i;
select i;
i = i + 1;
i = i + 1;
update i;
update i;
commit;
commit;
I know isolation level SERIALIZABLE would circumvent lost updates for sure. But I once read that REPEATABLE READ avoids lost updates as well, yet I am not sure whether that's true...
Thank you!
Kind regards,
Arno Huetter
Received on Mon Nov 25 2002 - 13:45:53 CST
![]() |
![]() |