Re: Oracle Isolation Level and ADO
- From: "Jim Kennedy" <kennedy-downwithspammersfamily@xxxxxxxxx>
- Date: Sun, 24 Jul 2005 16:06:58 -0700
<kenshiro2000@xxxxxxxxx> wrote in message
news:1122245982.667475.233480@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I have some COMs developed in Visual Basic. These COMs access to an
> Oracle DB with ADO. it isn't set the Isolation level of the transaction
> on the ADO Connection and i think that ADO use the default Level "Read
> Committed".
>
> This is the pseudo-code:
>
> ***********************************
> BEGIN TRANSACTION
>
> <<LOCK table1 exclusive mode>>
>
> idNew=SELECT MAX(TABLE1.id)+1 FROM TABLE1
> Insert into TABLE1 (ID) values (idNew)
> ....
> COMMIT
> or
> ROLLBACK
>
> ***********************************
>
> Then the explicit LOCK grants that two invocations of this code don't
> read MAX value two times.
>
> Is the explicit LOCK useless in this code?
>
> I know that all the Isolation Levels do strict 2PL on write locks. The
> isolation level impact only on read locks.
>
> What is the right Isolation Level?
>
> I think that "Serializable" should be equvalent to the explicit LOCK on
> the tables.
>
> Bye
>
> Ken
>
Doing an increasing number this way is a poorly scalable method. (it doesn't
scale) You are causing all operations to queue up behind this access to a
table. Don't do it. Use sequences instead.
Jim
.
- Follow-Ups:
- Re: Oracle Isolation Level and ADO
- From: kenshiro2000
- Re: Oracle Isolation Level and ADO
- References:
- Oracle Isolation Level and ADO
- From: kenshiro2000
- Oracle Isolation Level and ADO
- Prev by Date: Oracle Isolation Level and ADO
- Next by Date: Re: Oracle Isolation Level and ADO
- Previous by thread: Oracle Isolation Level and ADO
- Next by thread: Re: Oracle Isolation Level and ADO
- Index(es):
Relevant Pages
|