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: "First Updater Wins" -- Any ways around this?

Re: "First Updater Wins" -- Any ways around this?

From: Jim Smith <usenet01_at_ponder-stibbons.com>
Date: Thu, 18 Jan 2007 15:58:42 +0000
Message-ID: <BFrT2ofyk5rFFwnV@jimsmith.demon.co.uk>


In message <1168606043.786290.50720_at_v45g2000cwv.googlegroups.com>, pvm <murthypv_at_gmail.com> writes
>Hi All,
>
>I have a scenario in our application where I wish to get around the
>"First Updater Wins" Rule. Any ideas if this can be achieved?
>
>Let me give a brief description of the scenario.
>
>We have a web based application with a J2EE app server talking to an
>Oracle DB. The application is a normal web application.
>
>Now we have to build a second application - which is a training
>application for this web application. One of the key things required is
>the capability for examiners to pose practical questions -- such as
>"Create a Client by Name - John Smith" -- and the student needs to
>access the web app and perform the action required by the test.
>
>For this training app (which would use a doctored version of the first
>app) -- We plan to disable all commits. i.e. we would like to provide a
>basic version of the DB -- the student performs his actions -- plays
>around -- and when he logs out -- the entire session would be rolled
>back -- thus ensuring that the Database is in the same state (before
>he played with the data).
>
>This -- No commit - but insert/update intensive app is our prime motive
>-- We WANT TO lose all the changes he did :)
>And to make matters complex -- we want to allow multiple users
>concurrently to be able to access the base version of the data --
>completely oblivious of the existence of others.
>
>On the initial read, we felt snapshot Isolation (Serializable Isolation
>level) -- would be ideal for us -- as it would act as though each
>transaction is working with it;s own copy of the database. -- But --
>our happiness was short-lived -- as Oracle throws an error - as soon as
>the same row is updated in another transaction. (i,e, it does not wait
>till a commit) --If it had -- our scenario would work -- because we
>NEVER commit.
>
>So -- is there a way to circumvent the "First Updater Wins" rule and
>make it work like a "First Committer wins"?
>
>On a broader level, is there a way we can provide this in an Oracle DB
>-- the concept of being the only person playing with data -- oblivious
>of other users of the system?
>
>Cheers
>Murthy
>

As other posters have said workspace manager can do some of what you want.

You could also look into flashback database to restore the database to a clean state at the end of the day.

-- 
Jim Smith
Ponder Stibbons Limited <http://oracleandting.blogspot.com/>
RSS <http://oracleandting.blogspot.com/atom.xml>
Received on Thu Jan 18 2007 - 09:58:42 CST

Original text of this message

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