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: switching locking off?

Re: switching locking off?

From: Doug Cowles <dcowles_at_i84.net>
Date: 2000/07/07
Message-ID: <vkvcmso1f7cupiuolk3r19ej7hta4bep3f@4ax.com>#1/1

You can do an example of a lost update without turning any locking off which is why most applications on oracle use a select for update nowait..

Take any table in one session and update it's contents without committing.

In another session, update the same table with different values... It will block since there is a lock on the table from the first session.

Commit the first session..
Commit the second session..
You'll notice the updates in the first table are completely overwritten..

This can be a database issue..

Regards,
Dc.

On Fri, 7 Jul 2000 15:44:53 +0100, "Jenny Frederick" <jyfgac_at_pncl.co.uk> wrote:

>Hi,
> I am writing a Java program which is supposed to assist in teaching why
>locking is used in a database system (Oracle). Does any one know if there
>is any way that I can make Oracle 'switch off' locking, so I can show what
>problems occur when there is no locks (i.e. lost update problem,
>inconsistent analyis etc.). I know it is a bit of strange thing to ask a
>DBMS to do - to actually make its data inconsistent - but is there any way
>that I can actually do it rather than simulate it?
> Also, is it possible to have a single user have more than more
>transaction going on at any one time (obviously there has to be 2
>transactions for them to interfere with each other), or would it have to be
>that the user would have to have 2 sessions open at the same time?
> Thanks,
> Jenny
>
>
>
>
>
>
Received on Fri Jul 07 2000 - 00:00:00 CDT

Original text of this message

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