Removing Database Holes

This option has been removed from release 4.622. It is to be replaced by a new "Defragment database" option, which will give most of the benefit of a full database rebuild, but with a faster running time.

The number of small holes in the database data file increases over time, and when deletions and insertions are made in tables that have data compression enabled.

Option 2 - Remove holes from data file combines many small holes in the data file into fewer larger holes, placing these near to the physical end of the file.

We recommend that you enable roll-back logging when you run this option so that you can recover the database in the event of a system crash. However, if you do so, you should be aware that the reorganisation takes about twice the time it would normally take and that a large roll-back file may be created, depending on how much restructuring is done on the data file.

  1. On the DP4 System menu, select the Run program option. Use this command to run the reorganisation with roll-back recovery enabled:
    REORGDB -ROLLBACK
    and select the database

  2. On the Database Reorganisation menu, select option 2 - Remove holes from the data file. DP4 reorganises the data file

You can interrupt this operation at any time by using <Esc> or <Ctrl+S> and <Ctrl+C> or, on Windows, <Alt+F4>

Among the information displayed are counters to indicate how many holes there are in the data file and how many holes have been removed so far

Once the reorganisation is complete, press <Enter> to return to the DP4 System menu. Back up the database, using one of the methods described earlier

Crash Recovery

Should a system crash occur, you can recover the database with the database recovery utility if you enabled roll-back logging with the -ROLLBACK command tail. Otherwise, your only option is to restore the database from a backup.