Main BASIS Page
Main Advantage Page
This Issue's Table of Contents

Easing Record Recovery

New Tools For The GUI World Table of Contents Tuning In A Global Picture
By Chris Hardekopf

Attempting to recover records from corrupted data files can be an arduous and unrewarding process that often fails to restore many records. BASIS has developed a new record recovery file format that enables users to recover information from corrupted data files much faster and more effectively than before. Users can easily convert existing MKEYED files to the new record recovery file format, which can be accessed just like the original MKEYED file. The new format allows quick and easy recovery of records and key information if a data file becomes corrupted.

Any user who has had problems with MKEYED files becoming corrupted for any reason will find the new record recovery format invaluable. The new format tags records in the data file and stores extra key information with the record data. In addition, it stores a checksum of the key and record data that will detect actual data corruption of the record. This enables the efficient recovery of record and key information even if the data search tree is totally corrupted or missing.

The new format is optional because files using the new record recovery format will be larger, in some cases much larger, than the corresponding original file. This is unavoidable because of the additional key redundancy and bookkeeping information required to enable recovery. Each record stored has, in addition to the record data, a four-byte tag, the key data for a single-keyed MKEYED file, and a four-byte checksum. Users or developers can choose which data files are most vulnerable or irreplaceable and only convert those files to the new format.

Converting existing MKEYED files to the new record recovery format is easy using the mkconvert utility shipped with PRO/5® 2.1 and Visual PRO/5® 2.1. Simply run the mkconvert executable with the names of all of the MKEYED files that are to be converted as arguments. The format of the command is

  mkconvert <original file> ...

The executable will move the original file to a file named <original name>.old and replace it with a new file using the new record recovery format. This file will have all the same keys and data as the original file.

It is equally simple to recover the records from a recoverable file that is believed to be corrupt. The mkrecover utility shipped with PRO/5 and Visual PRO/5 2.1 does this. Just run the mkrecover executable with the names of all of the recoverable files that are to be recovered as arguments. The format of the command is

  mkrecover <original file> ...

The executable will move the corrupted file to a file named <original name>.old and replace it with a new file with all of the recoverable records. The key information will also have been restored. A user should recover the file as soon as possible after it becomes corrupt because the more a file is used after it becomes corrupt, the more records may be lost. It will not cause any problems to recover a file that is not corrupt; all records will be in the recovered file.

New Tools For The GUI World Table of Contents Tuning In A Global Picture

 
 
Copyright 1999, BASIS International Ltd. All rights reserved.
Terms of Use
.