Library

Short explanation of gfix.exe output

Alexey Kovyazin, 13-April-2014

When gfix.exe finishes it writes a summary of errors (if any) to the standard output (normally to the screen). Here is a short explanation of gfix output:

  • Number of record level errors - number of corrupted records found during gfix work. These records are not correct - essentially, lost.
  • Number of index page errors - number of index pages in bad indices. When even the only key is incorrect in index, gfix marks whole index as bad, so number of pages usually is high. However, since it does not affect user's data, and due to the fact that corrupted indices will be recreated during backup/restore, this can be considered as for your information only.
  • Number of transaction page errors - number of transaction pages which were fixed by gfix. Usually if you see this message it means that gfix did its job and now transactions are Ok.
  • Number of BLOB errors - number of bad BLOB pages, it indicates number of bad BLOBs.
  • Number of database page errors - this is the overall number of database pages, which were visited and changed/marked as bad by gfix. Again, this is mostly for your information.

Then you could look into firebird.log to see details about problems identified by gfix. Probably you will see a lot of messages regarding orphan pages.
Orphan pages are just lost space. They are consequences of errors, but theyare not errors.
Orphan pages are fixed if and only if there was no other errors detected and -full was specified

Also, there could be information about orphan record versions - they are different from orphan pages. The orphan record versions are not fixed in any case, they just stay in database.
If you have run gfix, such hardly corrupted records could be fixed by marking as "damaged" but only if -mend was specified. Such records stay in database, but they are skipped by the engine. 

So, gfix output gives you an approximate estimation of problems found in your corrupted Firebird or InterBase database. The good thing about this summary that if gfix is able to print it, it means that database is consistent enough.

If gfix was not able to recover your corrupted database, try IBSurgeon FirstAID.