Search code examples
informixb-tree

C-ISAM file consistency


INFORMIX-SE 4.10.DD6: I seem to be having spurious problems like missing pointers with C-ISAM files in my SE database. When I do 'bcheck -y FILE_123' it says it has rebuilt indexes and fixed the problem, but when I re-run bcheck on it again, it repeats the same error messages and says it fixed it, but not true! I know this is an unsupported/outdated version of SE, but if you can think of any other alternative to fixing this other than unloading/dropping table/re-create and load back in, I would appreciate any help. When I used SE 2.10.06, bcheck worked fine, but since moving up to 4.10, C-ISAM files and bcheck have been problematic.


Solution

  • There's the old trick of:

    • Create a new table with the same index structure as the table that is giving trouble.
    • Copy the (almost empty) index file for the new table over the index file of the old one.
    • Rerun bcheck.

    Of course, you take precautions:

    • You create the new table.
    • You copy the data file of the troublesome index file somewhere.
    • You copy the new index file beside it.
    • Run bcheck on the new copies.
    • Rerun bcheck on the rebuilt file.
    • Only copy stuff over the database copy if everything looks OK.