Page 1 of 1
kbfchk
Posted: Mon Sep 10, 2001 4:35 am
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?
kbfchk
Posted: Mon Sep 10, 2001 9:59 am
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.
kbfchk
Posted: Mon Sep 10, 2001 10:14 am
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.
kbfchk
Posted: Tue Oct 30, 2001 5:50 am
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
kbfchk
Posted: Tue Oct 30, 2001 10:14 am
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.