Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 8th, 2011, 06:47 AM
LVJ1970 LVJ1970 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 3 LVJ1970 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 31 sec
Reputation 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

Reply With Quote
  #2  
Old April 8th, 2011, 02:27 PM
mIRCata mIRCata is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Location: Plovdiv. Bulgaria
Posts: 200 mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 6 h 51 m 54 sec
Reputation Power: 11
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 02:36 PM.

Reply With Quote
  #3  
Old April 11th, 2011, 02:58 AM
LVJ1970 LVJ1970 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 3 LVJ1970 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 31 sec
Reputation 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

Reply With Quote
  #4  
Old April 13th, 2011, 03:20 AM
mIRCata mIRCata is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Location: Plovdiv. Bulgaria
Posts: 200 mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 6 h 51 m 54 sec
Reputation Power: 11
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.

Reply With Quote
  #5  
Old April 26th, 2011, 07:37 AM
LVJ1970 LVJ1970 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 3 LVJ1970 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 31 sec
Reputation 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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Corrupted firebird database?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap