Borislav
2007-02-08 22:25:28 UTC
Hi,
After a program crash, I realized the DB was corrupted and tried to
recover it. But I get some fatal error regarding wrong LSN on forward
pass. I tried both normal and catastrophic recovery, and they fail.
Then I found on some forum that this could possibly happen if one
tries to open it normally before realizing that it needs recovery. It
seems that it's impossible to recover a corrupted database if recovery
is not first thing you do it after it got corrupted. I'm embedding DB
in my application I'd like my users not to have to worry about
recoveries, and in general not to be concerned at all about the fact
that BDB is managing storage under the hood.
So, is there a safe API that I could call preventatively on startup to
check for an environment integrity and possibly run recovery if need
be? Simply running a fatal recovery (no matter what) takes too much
time and slows down the appearance of the first application screen by
40sec.
Thanks,
Boris
After a program crash, I realized the DB was corrupted and tried to
recover it. But I get some fatal error regarding wrong LSN on forward
pass. I tried both normal and catastrophic recovery, and they fail.
Then I found on some forum that this could possibly happen if one
tries to open it normally before realizing that it needs recovery. It
seems that it's impossible to recover a corrupted database if recovery
is not first thing you do it after it got corrupted. I'm embedding DB
in my application I'd like my users not to have to worry about
recoveries, and in general not to be concerned at all about the fact
that BDB is managing storage under the hood.
So, is there a safe API that I could call preventatively on startup to
check for an environment integrity and possibly run recovery if need
be? Simply running a fatal recovery (no matter what) takes too much
time and slows down the appearance of the first application screen by
40sec.
Thanks,
Boris