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: Lehmann <Spaceboy_NOoneSPAM_at_hotmail.com>
Date: Tue, 3 Oct 2000 11:40:13 +0200
Message-ID: <8rc9lt$964$1@news.inet.tele.dk>

The solution might be "LOCK TABLE miketable IN EXCLUSIVE MODE;" This will make user B wait for user A to end selecting and updating before it can do any work on the table. Just be sure that you don't get your self into a deadlock situation!

If an EXCLUSIVE MODE lock is to hard try any of these (from sql reference):

Hope this helps

Lehmann

<lfto_at_my-deja.com> wrote in message news:8rames$38r$1_at_nnrp1.deja.com...
> 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;
>
> thanks
> mike
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Oct 03 2000 - 04:40:13 CDT

Original text of this message

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