Managing recovery objects

As you regularly backup your database, you might accumulate large database backup images, and many database logs and load copy images. This task describes how you can manage these recovery objects.

About this task

Storing recovery objects can use great amounts of storage space. Once subsequent backup operations are run, you can delete the older recovery objects because they are no longer needed to restore the database. However, removing the older recovery objects can be time consuming. Also, while you are deleting the older recovery objects, you might accidentally damage recovery objects that are still needed.

Procedure

There are two ways to use the database manager to delete recovery objects that are no longer required to restore the database:

  • You can invoke the PRUNE HISTORY command with the AND DELETE parameter, or call the db2Prune API with the DB2PRUNE_OPTION_DELETE flag.
  • You can configure the database manager to automatically delete unneeded recovery objects.
    Limitation: When the LOGARCHMETH1 configuration parameter is set to USEREXIT, neither method deletes the archived log files.