Re: [firebird-support] db corruption
'Andrew Zenz' and...@aimsoftware.com.au [firebird-support] wrote: > FYI FirstAID scanned the database and identified 2 tables as having > corruption. I attempted a data pump with DBW excluding those 2 tables > but it failed on several other tables, tables that FirstAID claims are > clean. The tables on which it failed during the data pump... did they have foreign keys pointing to the 2 corrupt tables?? If they do, that's probably the reason it failed. If not... what exactly was the error? I've fixed a few DB's in the past manually but it's tedious work (and you might loose some records due to corrupt db-pages). Before pumping over the data from the corrupt DB you need to restore that DB to a working DB (backup/restore cycle). The DB will be marked as offline in case of errors but you can reach the data with a single instance of your DB-manager of choice. Then you need to remove the records in those tables which depend on the tables you left out. Or you need to NULL the foreign keys if your DB-design allows it. After that you should be able to pump the adjusted tables. (I even repaired some DB's in place after which I could bring them online again. And after a backup/restore cycle they were ok to use) Regards, Rik ++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/
RE: [firebird-support] db corruption
Thanks for the tip Michal, same error: internal Firebird consistency check (cannot find tip page (165), file: tra.cpp line: 2375) Andrew Zenz From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Sent: Monday, 4 April 2016 8:53 PM To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] db corruption Try this: gfix.exe" -mend -full -ignore -user sysdba -pass masterkey "your_corrupted_db.fdb" -- regards, Michał Kurczabiński
Re: [firebird-support] db corruption
Try this: gfix.exe" -mend -full -ignore -user sysdba -pass masterkey "your_corrupted_db.fdb" -- regards, Michał Kurczabiński
Re: [firebird-support] db corruption
On Mon, Apr 4, 2016 at 2:41 AM, 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]wrote: ... > > > I am using WI-V2.5.3.26780 Firebird 2.5 ODS 11.2 > > ... > > For both databases while running gbak: > > gbak -user sysdba -password masterkey -b -ig -l corrupt.fdb corruptbak.fbk > –v > > I get the error: > > gbak: ERROR:internal Firebird consistency check (decompression overran > buffer (179), file: sqz.cpp l > > ine: 239) > > gbak: ERROR:gds_$receive failed > > gbak:Exiting before completion due to errors > > gbak: ERROR:internal Firebird consistency check (can't continue after > bugcheck) > > > > When I run gfix on both: > > gfix -user sysdba -password masterkey -validate -full -no_update > corrupt.fdb > > I get the error: > > internal Firebird consistency check (cannot find tip page (165), file: > tra.cpp line: 2375) > The first error - decompression overran buffer - is a bad sign, but it may affect only one record, or with luck only one back version. But, that last error - cannot find tip page - is bad. TIP pages contain transaction state. Losing a TIP means that some transactions may be lost after reporting a successful commit. When you see that error, make a read-only copy of the database before you do anything else or Firebird may start garbage collecting good data. Gfix handles a limited number of common problems. IBSurgeon has a free tool, FirstAid, that analyzes corrupted databases and reports back all the types of corruption. In another mode, which is not free, it will fix some problems. More complicated corruptions require some degree of manual intervention. IBPhoenix, for one, has people and tools that can fix many corruptions. In your case, since you've lost a TIP, I'd recommend professional help if you want the as much of the data back as possible. > > I can pump some (most) of the data from them but hit errors on some tables > (unfortunately large important > ones) . One DB is 1.3Gb, the other is over 11Gb. > On a read-only copy of the database, you can probe with isql or another data browsing tool to identify bad records with indexed retrievals. This works best on a primary key. Look for records with primary key less than some value. If that works look for records with a key between that value and some other value. When you hit an error, narrow the range. That process should eventually identify all the bad records, and, with luck, you can pump the rest using key ranges. Good luck, Ann
[firebird-support] db corruption
Hi everyone. Due to some failing hardware and my tardiness to move the FB server elsewhere, our development databases have become corrupt. This isn't a big deal as we/I can create new ones (the metadata has been backed up and we have plenty of client data to use), but I have taken it as a challenge to learn more about recovering a corrupt database. I have used gfix and gbak, as well as DBWorkbench but try as I might, I cannot repair the database. For both databases while running gbak: gbak -user sysdba -password masterkey -b -ig -l corrupt.fdb corruptbak.fbk -v I get the error: gbak: ERROR:internal Firebird consistency check (decompression overran buffer (179), file: sqz.cpp l ine: 239) gbak: ERROR:gds_$receive failed gbak:Exiting before completion due to errors gbak: ERROR:internal Firebird consistency check (can't continue after bugcheck) When I run gfix on both: gfix -user sysdba -password masterkey -validate -full -no_update corrupt.fdb I get the error: internal Firebird consistency check (cannot find tip page (165), file: tra.cpp line: 2375) For those in the know, is this a recoverable error? Should I cut my losses and create a new DB? Any tips or tricks I could try? I can pump some (most) of the data from them but hit errors on some tables (unfortunately large important ones) . One DB is 1.3Gb, the other is over 11Gb. I am using WI-V2.5.3.26780 Firebird 2.5 ODS 11.2 Cheers, Andrew Zenz