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

Home -> Community -> Usenet -> c.d.o.server -> Re: prevent 2 users updating same row

Re: prevent 2 users updating same row

From: Grzegorz Dryl <Grzegorz.Dryl_at_crt.tpsa.pl>
Date: Tue, 3 Oct 2000 13:14:30 +0100
Message-ID: <8rceru$5mr$1@news.tpi.pl>

> hi, i have the following situation where user A and B select the
> same row...then A updates and commits....then B update commits..
> problem is user B overlays user A updates....i need to prevent this.
>
> the select for update only locks other users from updating...not reading
> any ideas?
>
> here's my sql..
>
> user A: select * from miketable where user= 100;
> user B: select * from miketable where user=100;
> user A: Update miketable where user=100;
> commit;
> user B: update miketable where user=100;
> commit;

try to change transaction isolation level

user A: set transaction isolation level serializable;
user B: set transaction isolation level serializable;
user A: select * from miketable where user= 100;
user B: select * from miketable where user= 100;
user A: Update miketable where user=100;
        commit;

user B: update miketable where user=100; ORA-08177 Received on Tue Oct 03 2000 - 07:14:30 CDT

Original text of this message

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