Wednesday, January 28, 2009

How to repair a corrupt Firebird database?


Disconnect users and disable incoming connections to the database

* make a copy of database file (or two copies) and work on that
* use GFIX with -v option to validate the database file
* use GFIX with -v and -f to do full validation

If problem is not too serious, you can try to backup the broken db and restore under a new name:

* use GFIX -mend to prepare corrupt database for backup
* use GBAK -b -g to backup the database. -g disables garbage collection
* use GBAK -c to restore backup to a new database.

No comments:

Post a Comment