File RecoveryInformation about each data file and index is stored in the first record of the file, called the header record. This information is modified whenever you add a record or key. In many cases, this information is not written back to the header record on disk immediately, particularly in single user situations. This improves the speed of the c‑tree Plus system, but also makes it possible to have incorrect information in the header if the program crashes before the header is updated. If this situation occurs, c-tree Plus detects that the header has been compromised. An appropriate error code is returned when opening a compromised data file or index. c-tree Plus provides a high level function, RebuildIFile(), which rebuilds the data file header and other information, and recreates the index. To use this function you must build an incremental ISAM structure for the file and indices, even if you are not using ISAM functions. c-tree Plus also provides a standalone rebuild utility, ctrbld, that can be used with ISAM parameter files. See Section “ctrbld - Parameter file rebuild utility” in this manual. If your keys cannot be described properly in an incremental ISAM structure, you will have to rebuild the index yourself. A general process would be:
If the data portion of the file appears to be corrupted, most likely due to a hardware problem, the c-tree Plus compact utility may be useful. See Section “ctcmpcif - IFIL-based Compact Utility” for further details. |
|||