kbfchk

Post Reply
sabety
Posts: 76
Joined: Wed Dec 06, 2000 7:11 am

kbfchk

Post by sabety »

I have a corrupt database table and tried to use the quick fix option but it had no effect. The other options are rather confusing, can you tell me how to issue a command line argument to kdbfchk that will fix a table?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

kbfchk

Post by Kai »

The normal fix option command line is:

kdbfchk -o fix.tbl corrupt.tbl

When it's done, move the fixed table onto the corrupt table:

mv fix.tbl corrupt.tbl

Make sure no database activity takes place on the affected table while this process is taking place.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

kbfchk

Post by mark »

If you still get errors and you're doing an indexed search it could be that your index is corrupt and needs to be rebuilt.
sabety
Posts: 76
Joined: Wed Dec 06, 2000 7:11 am

kbfchk

Post by sabety »

After I do the above, I still get a message like the following (BTW I have already dropped all indexes on this table):

005 Bad size 0 for column FILEID at offset 0xC in recid 0x51DED2 of e:\data2\AUD
IT.tbl in the function fbuftofld
100 Error in data, file e:\data2\AUDIT.tbl, offset 0x51DED2
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

kbfchk

Post by John »

That sounds as if that record has some bad data in it. Kdbfchk checks the structure of the file, not the contents. You may need to make a copy of the file, e.g.

create table NAUDIT as select * from AUDIT;

It will detect the error, and not copy that row, but will go on to read and process subsequent rows.
John Turnbull
Thunderstone Software
Post Reply