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

    Join Date
    Feb 2008
    Posts
    7
    Rep Power
    0

    Corrupted database help (GFIX + GBAK) was: Got error that i have no idea what is ...


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

    whan i try to connect to my firdbird databse, i've got error message like that, anyone can help me about this problem. thanks
  2. #2
  3. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Posts
    7
    Rep Power
    0
    Yes, i just copy it from my server hard drive, cause my server got serius error, however 3 days ago, this database file is okay, when i open that database, i'got that error. If my file is corrupt, how i can fix/correct it. Can you help me please.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,057
    Rep Power
    383
    Originally Posted by icekool
    Yes, i just copy it from my server hard drive, cause my server got serius error, however 3 days ago, this database file is okay, when i open that database, i'got that error. If my file is corrupt, how i can fix/correct it. Can you help me please.
    What happened when you tried gfix as suggested?

    Clive
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Posts
    7
    Rep Power
    0
    Originally Posted by clivew
    What happened when you tried gfix as suggested?

    Clive
    Well, i try tu use gfix with the command like this:
    C:\Program Files\Firebird\Firebird_2_0\bin>gfix -user SYSDBA -password masterkey c:\Program Files\Firebird\Firebird_2_0\examples\empbuild\sastraundip.fdb -v -f
    when i press enter i got this message
    data base fine name <c\Program> already given

    C:\Program Files\Firebird\Firebird_2_0\bin>gfix -user SYSDBA -password masterkey c:\Program Files\Firebird\Firebird_2_0\examples\empbuild\sastraundip.fdb -v -f
    data base fine name <c\Program> already given

    then i try to command like this

    C:\Program Files\Firebird\Firebird_2_0\bin>gfix -user SYSDBA -password masterkey ..\examples\empbuild\sastraundip.fdb -v -f
    Now i got this error message
    I/O error for file C:"PROGRAM FILES\FIREBIRD\FIREBIRD_2_0\EXAMPLES\EMPBUILD\SASTRAUNDIP.FDB"
    -Error while tryoing to open file
    -The process cannot access the file because it is being used by another process

    then i just try to shut it down first with this command
    C:\Program Files\Firebird\Firebird_2_0\bin>gfix -user SYSDBA -password masterkey ..\examples\empbuild\sastraundip.fdb -shut -force 0

    and again i just got this error message
    I/O error for file C:"PROGRAM FILES\FIREBIRD\FIREBIRD_2_0\EXAMPLES\EMPBUILD\SASTRAUNDIP.FDB"
    -Error while tryoing to open file
    -The process cannot access the file because it is being used by another process

    please tell me what i most suppose to do, i am now stress about this problem

    Thanks
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,057
    Rep Power
    383
    Try closing it using the firebird guardian
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Posts
    7
    Rep Power
    0
    Originally Posted by clivew
    Try closing it using the firebird guardian
    It is only usable if you run Firebird as application and not as service. For example, that's the only way on Windows 98. It's a small application that checks whether the Firebird server is running and restarts it if it crashes

    If you configure Firebird as service on newer Windows (XP, 2000, etc.) you can set it up to get restarted by Windows, so there's no need for the Guardian. (From firebirdfaq.org/faq31)

    what i should to do?
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Posts
    7
    Rep Power
    0
    After for a minutes, i just try to restart my computer then i try again command:
    C:\Program Files\Firebird\Firebird_2_0\bin>gfix -user SYSDBA -password masterkey ..\examples\empbuild\sastraundip.fdb -v -f

    and then i got this messege:
    database file appears corrupt
    -bad checksum
    -cheksum error on database page 1886550118

    what does it means

    Thank for your advice
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Posts
    7
    Rep Power
    0
    hi guys, i have success repair my database.
    Here this step-by-step what i do:
    1 use the command:
    Code:
    "C:\Program Files\Firebird\Firebird_2_0\bin\gfix.exe" 
      -v 
      -full 
      -user sysdba -pass masterkey 
    "c:\Program Files\Mailtraq\database\sastraundip.FDB"
    then i got these error message
    Code:
    database file appears corrupt
    -bad checksum
    -cheksum error on database page 1886550118
    2. then i mend it by this command
    Code:
    "C:\Program Files\Firebird\Firebird_2_0\bin\gfix.exe" 
      -mend 
      -full 
      -ignore 
      -user sysdba -pass masterkey "c:\Program Files\Mailtraq\database\sastraundip.FDB"
    3. Now i just check again if still i've got an error
    Code:
    "C:\Program Files\Firebird\Firebird_2_0\bin\gfix.exe" 
      -v 
      -full 
      -user sysdba -pass masterkey "c:\Program Files\Mailtraq\database\sastraundip.FDB"
    and exactly again, i've got the error
    4. Then i just use this command to create backup file
    Code:
    "C:\Program Files\Firebird\Firebird_2_0\bin\gbak.exe" 
      -b 
      -v 
      -ignore 
      -user sysdba -pass masterkey "c:\Program
    Files\Mailtraq\database\sastraundip.FDB"
    c:\temp\sastraundip.fbk
    5. to restore the file backup
    i just type this command
    Code:
    "C:\Program Files\Firebird\Firebird_2_0\bin\gbak.exe" 
      -c 
      -v 
      -REP 
      -user sysdba -pass masterkey "c:\temp\copy.fbk" "c:\program files\Mailtraq\database\copy.FDB"
    6. And bla.. i've got my data back, but when i user the propertis i found that the size of my database file lose about 50% of size
    so i guess i just safe 50% of my data.

    am i right??
    Btw i would like to say thanks to pabloj,clivew that have pay attention with my thread.

    Comments on this post

    • pabloj agrees : Thanks for posting the solution
    Last edited by pabloj; February 14th, 2008 at 05:28 AM. Reason: code tags added for readability
  18. #10
  19. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
    The database file grows under usage because it keeps "snapshots" of data for consistency in user queries (rather simplistic description, others will surely amend it) you have thrown away that and it's now smaller, nothing to worry about.
    Data loss doesn't come from this but from corruption, but in your case gfix seems to have saved everything.
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by icekool
    Unsuccessful execution caused by a system error that precludes
    successful execution of subsequent statements.
    internal gds software consistency check (can't continue after bugcheck).

    when i try to connect to my firdbird database, I have got error message like that, anyone can help me about this problem. thanks
    My dear,
    how you doing?
    You know there isn't any doubt about it that your database file is invalid and that's why you are getting that error message. If you want to remove that error message from your database file and you want to use your database file you must repair that file. After repairing the file the error message will be automatically removed from your file and then your file will be perfectly alright. But let me clear you one thing that you can't do this by your own hand. You have to get a program which will help you to perform the repairing process. Without any software program you can do it. So just go for a tool which is best in this case.
    Take care! Bye...........
  22. #12
  23. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    How to repair corrupt database files?


    Or you can use this one what I'm using. It's sysinfo tools DBF recovery tool. It's good. Just try it.......!
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Location
    Plovdiv. Bulgaria
    Posts
    226
    Rep Power
    13
    Originally Posted by SammyN
    My dear,
    Didn't you notice that the question is from 2008???? Do you think that he/she is still waiting to solve this problem after 4 years? Or you did this post only to advertise your product/tool?
    Last edited by mIRCata; May 28th, 2012 at 02:34 AM.
  26. #14
  27. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by mIRCata
    Didn't you notice that the question is from 2008???? Do you think that he/she is still waiting to solve this problem after 4 years? Or you did this post only to advertise your product/tool?
    Well Mr or Miss mIRCata!
    It was not just an advertising. You know what? I have noticed that.............but I guess you didn't notice that the thread has not been solved yet...............! Or has it?
  28. #15
  29. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    9
    Rep Power
    0
    Since it seems to have been missed, and only because there have been 13,000 views of this thread, may I throw in my 2 peneth.

    Icekool DID solve the problem if you read the end of his last entry. Corruption of firebird databases did used to happen occasionally, they were often caused by using a windows program to make a COPY of the database while it was in use. This corrupted both the original data and the copy! I also suspect there were other sources of corruption where the flushing of data from memory to disc was interrupted.

    I'm glad to say this is happening much less frequently now (it must be a couple of years or more since this was last reported to me by my customers) but the solution was just as Icekool said - backup the data and restore it.

    For any current users please not that it is far better to make a backup of the database and then restore it as a "copy" for many reasons. First of all it doesn't cause corruption, then the transaction management ensures your copy will have a consistent view of the data. The backup process also does "garbage collection" and as was noted the size of the restored database will often be smaller than the original. Also the indexes are re-balanced. Orphaned transactions are deleted and .... shall I go on? The most important thing is that you can take your backup while the database is still being used by other users - with no ill effect.

    Oh and did I say, the backup/restore process will rectify many corruption problems with minimal loss of data.

    Comments on this post

    • pabloj agrees

IMN logo majestic logo threadwatch logo seochat tools logo