#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Corrupted firebird database?


    Hi

    I am fighting with a corrupted firebird 2.5 database, using IBExpert.

    A single entry in a huge table seems corrupted.

    Select * from tur_game where game_id < 241547 works fine.
    Select * from tur_game where game_id > 241547 works fine.

    But...

    Select * from tur_game where game_id = 241547

    .. or..

    Delete from tur_game where game_id = 241547

    gives me the following error:

    Error Message:
    ----------------------------------------
    Unsuccessful execution caused by a system error that precludes
    successful execution of subsequent statements.
    internal gds software consistency check (can't continue after bugcheck).

    Indeed, any attempt to do anything in IBExpert (restore/backup for example) fails when trying to deal with the corrupted record.

    Any ideas on how to fix this?

    Regards
    Lars
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Location
    Plovdiv. Bulgaria
    Posts
    226
    Rep Power
    13
    When does the backup/restore with IBExpert fails? When you do the backup, or when you do the restore?
    And can you use Verbose option when you do the restore - to see exactly when it fails? Is it when restore activate some index?

    If it's a foreign key's index then you have a record that point to master record that don't exists in the master table.
    In these cases there are two options - try to insert the missing record, or delete the records in the child table that points to the missing master records. After that do backup restore.

    I use this kind of query to find the missing records

    SELECT CHILD.*,MASTER.* FROM CHILD LEFT JOIN MASTER ON CHILD.FK = MASTER.PK

    And the rows where I have data for the child table but not for the master are the problem ones.

    Try this first and if this doesn't help we'll think something else.
    Last edited by mIRCata; April 8th, 2011 at 03:36 PM.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0
    Hi

    <snip>
    When does the backup/restore with IBExpert fails? When you do the backup, or when you do the restore?
    <snip>

    It fails during the backup, when the backup reaches the tur_game table.

    It fails with exactly the same error message as when I do a read/delete/insert on entry 241547 in the tur_game table, viz:

    Error Message:
    ----------------------------------------
    Unsuccessful execution caused by a system error that precludes
    successful execution of subsequent statements.
    internal gds software consistency check (can't continue after bugcheck).

    Regards
    Lars
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Location
    Plovdiv. Bulgaria
    Posts
    226
    Rep Power
    13
    Try gfix with mend option ( IBEXpert - Database Validation only Mend Database checkbox checked )
    And after that do a backup or backup with Ignore check sum option.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0
    Hi

    Sorry about the late reply... I've been sidetracked by the Easter holiday.

    gfix with the -m option works.

    Thanks!

    Regards
    Lars

IMN logo majestic logo threadwatch logo seochat tools logo