Re: What to do with this situiation 2

From: nwhitehead_at_rocketmail.com <(nwhitehead_at_rocketmail.com)>
Date: 1997/10/06
Message-ID: <34394383.2031731_at_news.cybernex.net>#1/1


On Fri, 03 Oct 1997 16:51:28 GMT, Thenardier_at_POBoxes.com (ªü´ö Thenardier) wrote:

>
>Another situation - a critical issue on emergency plan.
>
>In a client-server system, a client is committing a batch
>of records, say, 200, to an Oracle database (multiple tables
>perhaps) at the server. During the prcess, OOPS! the client's
>power is off! Only half of the records could be successfully
>committed. The user's just sitting there, shocked! Saying
>'where have all the data gone...?'
>
>When the power is on again, I don't think I could rollback
>all the records cos some of them has been committed.
>
>But what to do with the rest of the 'committing' data?
>Would it disappear forever?
>What should a system designer handle in design time?
>Does Oracle say anything about this?
>
>Most important. Any good books covering this issue?
>
>I'll be happy if anyone here could share ur experience :D
>
>Thanx very very very much!
>
>
>Thenard
>--
>*******************************************************
>*** ***
>*** ¦³°ÝÃD¶Ü¡H Got a problem? ***
>*** §äªü´ö§a¡A Just ask Thenardier, ***
>*** ¥L·|±N¥¦Åܦ¨¨aÃø¡I he'll make it a tragedy! ***
>*** ***
>********************************************************
What you need is soem type of batch file recover system. I have seen 2 types used, depeneding on the number of records and the load associated with running one record.

  1. If every record in your batch is unique and can be indentified as such, AND the overhead and number of records is low, you can apply unique indexes to the tables in question, and after a power failure, you just run the batch files over again and the records that were already applied will simply be rejected as duplicates. When the batch file reaches the point of failure, records will continue processing normally until completion.
  2. If overhead is high and you are unable/unwilling to re-process already processed records, you will need file recovery. There are a couple of ways to do this, but basically, as you process a record ( or set of records ) in a batch file, you keep a seperate ( un-cached ) file with a log of which records have been successfully applied and commited. After failure, you can fats forward you batch file to where you left off before failure. So long as you do not log a record in the recovery file until it has been committed, it will work fine.

Nicholas
nwhitehead_at_rocketmail.com Received on Mon Oct 06 1997 - 00:00:00 CEST

Original text of this message