Subject Re: Corruption problem
Author rogervellacott
Gary,

gfix -mend worked. Many thanks. What a relief!

This is something I should have known. My excuse is that corruption
in my Firebird databases is so very rare that even if I did know, I
would forget quite soon through lack of practice.



Roger Vellacott.




--- In firebird-support@yahoogroups.com, "Gary Benade" <hobbit@l...>
wrote:
> Steps to fix database:
>
> 1) always work with a copy of the database in case further damage
occurs.
> Working with a copy also gives you exclusive access which is
required to
> perform the following operations:
> 2) gfix -v -f database.gdb
> 3) if previous step reports corruption: gfix -m -i database.gdb
> 4) repeat step 2 to see if the corruption was fixed
>
> Steps to salvage data:
>
> 1) create a new database with the same metadata structure:
> A) gbak -m will backup only the metadata. It can then be restored
to create
> a
> new database.
> B) isql -x -a will extract the metadata to a script file.
> isql -i scriptfile will then create the new database.
> 2) copy the data to the new database:
> A) Delphi's datapump can be used to copy data from all tables to a
new
> database.
> B) use isql to perform a table by table copy of the data.
>
> Hope this helps
> Gary