Skip to main content

This article explains what the Rebuild –d option specifies when reconstructing the index of an indexed file.

Problem:

The –d option specifies that Rebuild should reconstruct the index of an indexed file from the data area. Any corrupt data records are skipped and logged to a file. However, if rebuild is entered at the command line you get:

-d [:c] –rebuild corrupt data file

What does it do, rebuild the index or rebuild data?

Resolution:

If the data portion of the file is intact and only the index portion is corrupt, then Rebuild can generate a new index (.idx) file from the data file with no loss of data.

If the data portion of the file is corrupt then Rebuild can rebuild a complete new indexed file, both data and index portions, but there will be loss of data as Rebuild discards any corrupt data records that it encounters.

Note: When you use Rebuild to generate a new index file from an existing data file, the file can grow in size. One reason is that information held in the original index about free space in the data file is lost, which means that the free space cannot be reused. Another reason is that if you specify the –d option, index records are created individually as with normal I/O operations, leading to index nodes that are only partially filled. To overcome this problem you should reorganize the file after you have rebuilt the index.

Incident Number: 2260205

Old KB# 14442