IBSurgeon FirstAID v6.0.1

IBSurgeon FirstAID v6.0.1

IBSurgeon FirstAID v6.0.1
IBSurgeon FirstAID v6.0.1


IBSurgeon FirstAID is the tool that can automatically diagnose and repair corrupted Firebird or InterBase databases - it can recover corruptions that neither gbak nor gfix can fix. Supported versions: Firebird 1.0, 2.0, 2.1, 2.5, 3.0, InterBase from 4.0 to XE7.

It uses its own layer for low-level database access without using the InterBase or Firebird engine, so it can perform real "surgical" operations and repair your database when all other standard mechanisms (gfix and gbak) cannot.

How to repair Firebird database:
Download FirstAID - no registration required.
Open the corrupted database with FirstAID and double click on the table name, then browse through table's data pages.
If you decide to recover data you see in FirstAID, purchase the license (you'll get your password in 15 minutes after completed purchase). What you see is what you will recover with FirstAID.
Make sure to read FirstAID (Firebird and InterBase) Recovery Guide before recovery actions!

What is a database corruption and how FirstAID repairs it?
Usually, the database corruption means that some links between internal structures of Firebird (or InterBase) database are broken. When the database engine sees a broken reference to missed record or database page, it stops to work with a message like this:

Internal gds software consistency check ()
Or, for recent Firebird versions:
Internal Firebird software consistency check ()
Such error messages are reported by gbak tool, by gfix (it writes them into firebird.log), and by end-users applications (you can see the full list of "software consistency check" errors here).
The first part of this error is a common prefix for bugcheck (i.e., serious error), and in the parentheses, there are details of the error.

Usually, such error prevents normal work with the database, and the recovery procedure should be executed. If it was not possible to fix corrupted Firebird (or InterBase) database with standard means (gfix.exe and gbak.exe), it is time for IBSurgeon FirstAID.

IBSurgeon FirstAID is designed to work with the database directly, on very low-level – it allows bypassing erroneous places where engine crashes and either fix broken links or export all users data to the new database.

Two options to recover Firebird or InterBase database with FirstAID
IBSurgeon FirstAID 6.0 can perform 2 kinds of recovery operations: direct recovery and data extraction. The direct recovery is intended to fix the original corrupted database in place. This is a very fast and efficient method: after fixing the broken links database usually becomes readable, and it is possible to perform backup and restore. There are detailed instructions in FirstAID Recovery Guide how to use the direct fix in FirstAID and then perform final steps with gfix and gbak tools.

The data extraction is designed to view and export data from the corrupted database to the database with the same structure (usually it should be empty).

FirstAID data extraction is applied in the case of heavy corruptions or metadata losses: it uses only a few system tables to decrypt users data and export all available data to the new database.

Important! You can download the free version of FirstAID, open the corrupted database and preview all available data – and if you can see these data, they can be saved and exported to the new empty database. FirstAID scans corrupted database then shows the list of tables, so a user can browse them.

Recovery service
Important! If you cannot see data with FirstAID in your corrupted database, please contact our support: support@ib-aid.com. Please send diagnostic log and relevant details (full error text, screenshots, etc) to our support, and get recovery estimation for free.

You will receive an exact free answer on whether your database recoverable or not, is it recoverable by FirstAID directly, or some manual work needed. We will also try to estimate how much of your data can be recovered if there really is a serious problem that will not allow 100% recovery.

For serious problems we offer Firebird (and InterBase) database recovery service - see more details here.

Common Firebird corruptions and their error codes
There is a number of possible corruptions that IBSurgeon FirstAID has been designed to repair and correct. These are listed below:

Internal gds software consistency check (cannot find tip page (165)) The required Transaction Inventory Page is corrupt and the database cannot be opened. Firebird error code (bugcheck number) is 165. It is expected in this instance that neither gbak nor gfix will be able to repair your database (except in the case of a Read Only database). IBFirstAID will repair the missing pages and recover the database. It should be fixed with FirstAID Direct.
Database file appears corrupt (). bad checksum. checksum error on database page. gds_$receive failed This error is reported by gbak, it indicates corruptions caused by lost or zeroed pages: Firebird cannot find checksum placeholder (it is 12345 since InterBase 5.x) and reports any other value of as "bad". It can be fixed with Direct Fix or, in the case of heavy corruption, with extraction.
Internal gds software consistency check (decompression overran buffer (178)....) One or more records are damaged. Data should be exported from the corrupted database with FirstAID extraction.
Internal gds software consistency check (wrong record length (183)...) One or more records are damaged: the actual length of the record is different from declared one. The data from the corrupted database should be exported with FirstAID extraction. Bugcheck number (error code for this error) is 183.
Unknown database I/O error for file "*.gdb". Error while trying to read from the database file. This usually indicates that a number of database pages have probably been lost at the end of the database file (power failure?). In this case, the database cannot be opened. Gfix cannot repair this. IBFirstAID will recreate the missing system pages and deletes the wrong pointers.
Database file appears corrupt. Wrong page type. Page NNN is of wrong type (expected X, found Y). This error can indicate a number of problems. But typically there are missing pages in the database or the page that is being accessed is not the expected page type. For example, if the expected page type is 5, it can mean that some data may have been corrupted within a table. Such a corruption may prevent a successful backup or may make the table unavailable to the database. IBFirstAID fixes the wrong page pointers and repairs the database.
Fragmented record NNN is corrupt in table TABLE(NNN) One or more fragmented records lost their fragments, so the whole record cannot be assembled from fragments. In this case, data should be exported from the corrupted database with FirstAID extraction.
Wrong record length. Cannot find backversion. IBFirstAID will check every record in a database and will try to repair these record-level errors.
internal gds software consistency check (pointer page vanished from mark_full (256), file: dpm.cpp line: 3240) Serious corruption, data export with FirstAID is recommended.
Invalid request BLR at offset NNN. This error occurs in a case of corrupted or incompatible BLR (Binary Language Representation) of some stored procedure, trigger or view in the database. Ideally, this error should be fixed with the recompilation of appropriate database objects, but in the case of the persisting problem, the full export to the new good database is required. The peculiarity of this error that backup/restore with gbak does not fix it since BLR is not recompiled automatically during backup/restore.
Other database corruptions can be caused by lost pages, corrupted records, metadata problems, etc. The full list of Firebird errors and their codes are here.

Only for V.I.P
Warning! You are not allowed to view this text.
  • 1 777