Subject Re: [firebird-support] gfix questions
Author Markus Ostenried
On 12/20/06, heineferreira <heineferreira@...> wrote:
> I haven't had a corrupt firebird database but I was wondering how good
> gfix is? A friend of mine who has over a hundred customers who all use
> firebird says that he insists that his customers install ups'es and he
> says that he never even had one corrupt database.
> Do firebird databases only become corrupt during power failures?

Other reasons include faulty RAM, defunct disk drives, and running out
of disk space. One of the most nasty ways would be to hit the file
size limit - most likely the 2gb/4gb limit on a 32bit file system when
no secondary db files are defined. In this case the engine will
overwrite existing db pages which cannot be restored later. And no,
this cannot easily be fixed, because a check for free disk space every
time a page is written would slow down writes too much.

That being said I never had a corrupt db even though my customers are
quite careless and a hardware reset and the occasional power loss
happened more often than I liked. Just be sure to have the Forced
Writes setting enabled on windows machines. Normally all you would
lose then are the changes of the transactions that were not committed
at the time of the failure.

The only problem I encountered so far was with backups not being able
to restore because a new not-null-field was added without providing
values for existing records. But of course that's the fault the
developer (me).

Oh, and one time there was something wrong with an index that could be
fixed with gfix and recreating the index - don't remember the details
right now.

Also have a look at this list:
http://www.ib-aid.com/interbase/firebird/error/commonerrors.html

HTH,
Markus