Subject Re: [ib-support] bad eroor on a db backup or gfix
Author Ann W. Harrison
At 02:30 PM 12/11/2000 -0800, marius wrote:
>have a v5.6 interbase db xxx.gdb and when i do a backup
>gbak: writing data for table DONES
>gbak: ERROR: database file appears corrupt ()
>gbak: ERROR: wrong page type
>gbak: ERROR: page 28300 is of wrong type (expected 5, found 7)
>
>how do i save my data from the db please......

Your best chance is to backup with garbage collection turned
off. If that works, everything is fine. If it doesn't, the
problem is in the table DONES, which includes a doubly allocated
page - it should be a data page (5) and is an index page (7).
By probing on the primary key, you can probably isolate the
problem to a few rows.

What do I mean by probing on the primary key? Something like
select count (*) from dones where <pk> < 'M'. If that returns,
select count (*) from dones where <pk> >= 'M' and <pk> <'T'.
And so on. Obviously the ranges you choose will depend on the
data.

Finally, I can probably fix the database, though I may lose
part of the records that should have been on the index page.
I charge $150/hour, with a one hour minimum.


Regards,

Ann
www.ibphoenix.com
We have answers.