Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Usage of RowId...

Re: Usage of RowId...

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/11/19
Message-ID: <365e67d1.106893925@192.86.155.100>#1/1

A copy of this was sent to zfred <zfred_at_ozemail.com.au> (if that email address didn't require changing) On Thu, 19 Nov 1998 11:14:46 +1100, you wrote:

><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
><HTML>
>I don't like that idea because it essentially requires two updates to achieve
>one update,
><BR>I think i see the potential for a race condition....
><BR>SQL SERVER/SYBASE have the perfect solution in their timestamp column,
><BR>the server itself generates a unique number for the row every time
>it updates,
><BR>therefor if everone is reading the timestamp, and everyone updates
>using the timestamp,
><BR>it is gaurenteed that ONE update is always sucessful!!! - the others
>fail and need to
><BR>try again.
><P>I do now have the problem of converting the timestamp idea to Oracle
>8 database,
><BR>I don't want to change the application code, any ideas ?
><BR>&nbsp;

Its quite easy to do this, there are a couple of options.

You might want to check out the page:

http://govt/govt/owassi/docs/utility/owa_opt_lock.html

It describes exactly how to do the transparent "sybase" like optimistic concurrency control. It also offers other ways to do this without adding an extra 'timestamp' column such as checksums and saving before images in hidden fields in the form...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/    -- downloadable utilities
 
----------------------------------------------------------------------------
Opinions are mine and do not necessarily reflect those of Oracle Corporation
 
Anti-Anti Spam Msg: if you want an answer emailed to you, 
you have to make it easy to get email to you.  Any bounced
email will be treated the same way i treat SPAM-- I delete it.
Received on Thu Nov 19 1998 - 00:00:00 CST

Original text of this message

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