Subject Re: [firebird-support] Re: Error
Author Eugen Stoianovici
Thomas wrote:
> Hi Eugen,
>> internal gds software consistency check(wrong record length 183,
> file:
>> vio.cpp line 1103)
> I've actually just fixed a DB with this error. Depending on how badly
> the db is corrupted will depend on how you can recover from this. You
> sometimes have luck selecting the records before this and the records
> after it. This only works if you've got an Index (even a PK will work)
> on the table and you use that index to select the records by. The key
> is to avoid reading the corrupted record (once you've figured out which
> one it is).
> An easier way for me was to compile a version of Firebird with the
> BUGCHECK(183) commented out which allowed me to do a select of all the
> good records from the table (as well as perform a backup and restore).
> I unfortunatly did this with 2.1 but I can send you the FBServer.exe if
> you want to give it a bash.
> You can sometimes also use IBDBRepair to select all the records that
> are not corrupted.
> I'm keen to hear if there are any other ways to rectify this.
> Regards
> Thomas
i'm using firebird2 on windows but it should be the same on other OS's:
I've fixed it using gfix which is distributed with the server binary
package. I don't know if it is the best way to do it but it worked, so...

gfix -username user -password pass localhost:dbfile -mend /* prepares
the db for backup */
gbak -username user -password pass localhost:dbfile backupfile -B
/*creates a backup*/
and now just restore that backup (i used flamerobin for restoring so i
don't know the actual comand :) )

i tried searching for the broken row but i couldn't find an easier way
(than recompiling firebird)

Thanks for your reply