Subject Unable to repair a corrupt database
Author

I have a Firebird 2.5.2 database (ODS 11.2).  The database has corrupted.  When I open the database, I receive a message 

"page 1577 is of wrong type (expected 4, found 5)"

I have tried using gfix, gfix -mend, gbak to attempt backup but it doesn't work.  I also try if qli may extract the data, and again, I can't open the database in ready statement.  Same corrupt message prompt out.


I even try to change the byte at position (1577 * 4096) from 0x05 to 0x04 but it turn out to the following message when I perform gfix or gbak:

Reached the end of the file.

I think IBSurgeon shall works but the price isn't something I can afford.  Is there any other alternate way to fix the database?