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: Dirty Read

Re: Dirty Read

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/03/22
Message-ID: <953724514.19707.1.pluto.d4ee154e@news.demon.nl>#1/1

If the hold flag is not null, the record is locked and can't be read. This will either result in the other transaction waiting or aborting. If the transaction aborts, the other user will receive and error message. Why do you add a hold flag if Oracle already has a locking mechanism? The hold flag is completely redundant, unless you commit the change of the hold flag immediately and start a new transaction right away. That wouldn't work either, because there's no guarantee another session will start a transaction using that record. Or all transaction should read from aview where hold flag is null.
You are adding awful lot of overhead and it will help you nothing. Running into a locked record: that's just the way it is with relational databases, it can't be prevented.
It's just the way it works.

Regards,
Sybrand Bakker, Oracle DBA

<goldenge_at_my-deja.com> wrote in message news:8ba3is$alc$1_at_nnrp1.deja.com...
> Hi All,
> In Oracle database server , How can I read the uncommitted
> information? Suggest, there are two transaction will update the same
> record at the same time. This will deadlock.
> In our bussiness transaction, the table have a HOLD flag column, when
> user update the record, first he check the HOLD flag , if this is null,
> then he can update this record, and then he update this flag,(this
> update information is uncommitted information, other user can not read
> this from anthor transaction ). If the HOLD flag is not null, then the
> user can get the information that this record is hold by another, so he
> can not update this record. The key problem is another user connect to
> the datatabase from another transaction, he can not read first user
> update the HOLD flag, this flag will be committed with the whole
> transaction .
>
>
> pls give some help!!!!!
>
> Best Regards
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Mar 22 2000 - 00:00:00 CST

Original text of this message

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