db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag Wanvik <dag.wan...@oracle.com>
Subject Re: Rollforward recovery problem
Date Thu, 06 Sep 2012 18:25:46 GMT
Hi istanbullu,

Derby is not designed to recover from deleting the database files under 
seg0.
If these files get deleted/damaged you need a full backup as produced from
calling SYSCS_UTIL.SYSCS_BACKUP_DATABASE and then restoring it up to the 
last transaction committed in the log files.
Trying to recover from the log files alone is not guaranteed to work.

Cf.
http://db.apache.org/derby/docs/10.9/ref/rrefbackupdbproc.html (backup)
http://db.apache.org/derby/docs/10.9/ref/rrefrestorefrom.html (restore)
http://db.apache.org/derby/docs/10.9/adminguide/cadminrollforward.html 
(roll forward recover)

Thanks,
Dag

On 05.09.2012 16:44, istanbullu wrote:
> Hi,
>
> I have a script that does rollforward recovery, but recovery does not appear
> to be working in a particular scenario.
>
> Let me first describe a test scenario that works:
>
> 1) I take a DB back-up by enabling log archive mode
> 2) I delete all files under seg0 directory of the original DB
> 3) Then, I run my rollforward recovery script, and I see the DB restored
> from the backed-up DB created in step 1.  I run consistency check and I see
> no issues in the restored DB.
>
> Now, here is the failing scenario:
>
> 1) I take a DB back-up by enabling log archive mode
> 2) I delete a subset of files under seg0 directory of the original DB (say
> c5*.dat)
> 3) Then, I run rollforward recovery script, and I DO NOT see the deleted
> files restored from the backed-up DB created in step 1.  I run consistency
> check and it fails.
>
> Note that the only difference is that in successful scenario all files under
> seg0 are deleted.
>
> My scripts are along the lines of code snippets discussed in this
> developerworks article:
>
> http://www.ibm.com/developerworks/data/library/techarticle/dm-0502thalamati/index.html
> http://www.ibm.com/developerworks/data/library/techarticle/dm-0502thalamati/index.html
>
> Any comments appreciated.
>

Mime
View raw message