Re: Oracle Isolation Level and ADO




<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


.



Relevant Pages

  • Oracle Isolation Level and ADO
    ... Oracle DB with ADO. ... BEGIN TRANSACTION ... Is the explicit LOCK useless in this code? ... isolation level impact only on read locks. ...
    (comp.databases)
  • Re: IsolationLevel workaround?
    ... In the end I opted not to use the ADO transaction methods (i.e. ... This allows me to use the SNAPSHOT isolation level. ... Is there any way to get ADO to use the SNAPSHOT isolation level? ...
    (microsoft.public.data.ado)
  • Re: Oracle Isolation Level and ADO
    ... >> Oracle DB with ADO. ... > object to specify an isolation level, ... > so it is similar to EXCLUSIVE locking. ...
    (comp.databases)
  • IsolationLevel workaround?
    ... I would like to use the SQL 2005 SNAPSHOT isolation level. ... that the ADO IsolationLevelEnum has not been updated for SQL 2005. ... ReadCommitted whenever I begin a transaction. ... Is there any way to get ADO to use the SNAPSHOT isolation level? ...
    (microsoft.public.data.ado)