Subject Re: [firebird-support] Database corruption
Author Alexey Kovjazin
Hello, Jonathan!

Summary of validation errors

Number of record level errors : 6
Number of index page errors : 2
Number of database page errors : 12946

Check the InterBase.Log file for additional information

So I gather that it's not repairable...

Wrong :)
It is a light corruption with very little loss of data.
The core of problem - several records were missed because of connection
abnormal interruption.

When, missed records caused missing some entries in indices related with
this table.
Index is a B-tree structure and if one of entries in higher level is
incorrect, all (or just subordinate) index entries should be rebuilded (I
think Ann may explain it much more perfectly in right words).

Huge number of orphan pages means that index is marked unavailable and all
its pages are marked as free after.
gfix -mend - i.e., while walking through the index gfix did not reach these
pages, so they are not used and marked as orphan.

To fix such corruption, just backup and restore your database. Index will be
Overall loss is only 6 records or even less.

Sincerely yours,
Alexey Kovyazin