Library

Internal gds software consistency check - how to recover Firebird/InterBase databases

Oleg Matveev, 20-Nov-2014
When Firebird (or InterBase) instance cannot perform some operation without warranty that database consistency will be not impacted, it raises an error (bugcheck) and interrupts current operation.
Such Firebird error text starts with mandatory prefix "internal gds software consistency check (can't continue after bugcheck)" (for recent Firebird versions it is "internal Firebird software consistency check"), and then an actual error text follows (like "decompression overran buffer (179)").
Often "internal software consistency check" errors mean that Firebird database is corrupted (however, it is not a rule) - i.e., the consistency of the internal database image is broken and should be fixed to continue the normal work.

If you see such error in your firebird.log or as an error message in your application, run this command to make sure that your database is Ok:

gfix.exe -v -full -user SYSDBA -pass masterkey path_to_your_database


If gfix validation returns errors, the database is corrupted and requires recovery,

Try recovery with gfix first:
gfix.exe -mend -ig -user SYSDBA -pass  masterkey  path_to_your_database
and then backup database:
gbak.exe -b -g -user SYSDBA -pass masterkey   path_to_your_database path_to_backup
and restore

gbak.exe -c -v -user SYSDBA -pass masterkey    path_to_backup path_to_new_database 

If there is a problem during gfix/gbak, recover corrupted database with IBSurgeon FirstAID tool - the majority of "internal Firebird consistency check" errors can be fixed with it; FirstAID was specifically designed to deal with heavy database corruptions.

Also, if you have corrupted Firebird or Interbase database, please contact our support: support@ib-aid.com and provide the full text of error (or screenshot).