Subject Re: [firebird-support] "database file appears corrupt" how to fix?
Author Ann W. Harrison
Yusuf Celik wrote:
> -wrong page type
> -page 4522 is of wrong type (expected 3, found 0)

That's not good at all. What did you do to reconstruct the disk
after the hard crash?

Here's what that message means. Page 4522 was supposed to be
a transaction inventory page, and so identified by a byte in
the page header. That byte is zero. Normally when the page
type byte is zero, the whole page is zeroed. Firebird keeps
the state of transactions (active, committed, rolled back,
limbo) on transaction inventory pages. With that page gone,
there's probably no way to bring the data back in a consistent

If you have a backup and can reconstruct the changes since
the backup was made, that's your best hope. IBPhoenix has
people and tools that can (probably) get much of the remaining
data out of the database. My guess is that if one page is
zeroed, there will be others. A transaction page would be
one of the first pages accessed on startup.