Reorganising with Rebuild

  1. On the Database Reorganisation menu, select option 3 - Rebuild data and index files. DP4 displays a message for each stage of the reorganisation. There are three main stages:

  2. When the reorganisation utility terminates, press <Enter> to return to the DP4 System menu. Back up the database, using one of the methods described earlier

Crash Recovery

If the machine crashes before the 'Indexing other tables' phase, you can continue the reorganisation by renaming an old index file to the index filename (if you do not have an old index file, use one from another database with the same numbering system and generation number equal to or less than the crashed database), and restarting the reorganisation from the Run program option of the DP4 System Main menu:
REORGDB -CORRUPT
If the machine crashes in the 'Indexing other tables' phase, the original data file has been replaced by a new file called <DB_NAME>.$$D. Rename this file to <DB_NAME>.DAT, copy an old index file to <DB_NAME>.IND and restart the reorganisation with REORGDB -CORRUPT. By now the data file has been rebuilt, so select option 1 from the Database Reorganisation menu; it will be faster than option 3.