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: Valentin Minzatu <valentinminzatu_at_yahoo.com>
Date: 12 Jan 2007 05:09:48 -0800
Message-ID: <1168607388.383090.205030@11g2000cwr.googlegroups.com>

pvm wrote:
> 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

I have not used this feature before, but sounds like the perfect example of usage for Workspace Management (see a high level overview at:
http://www.oracle.com/technology/products/database/workspace_manager/pdf/twp_AppDev_Workspace_Manager_10gR2.pdf). Received on Fri Jan 12 2007 - 07:09:48 CST

Original text of this message

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