DB2 always uses logs to record changes that are made to the database. Depending on the recovery strategy that you use, however, DB2 uses the logs in different ways. For a full discussion on how DB2 uses logs, refer to the Administration Guide. In the satellite environment, however, logs are also required if you want to use DB2 data replication. The description that follows describes how you should set the value of the logretain database configuration parameter.
If you are using DB2 data replication on the satellite and:
When you set the logretain database configuration parameter to Recovery, the backup_pending database configuration parameter is activated. You must back up the database before it can be accessed. You back up the database using the backup database command. For information about this command, refer to the Command Reference.
When the logretain database configuration parameter is set to Recovery, the logs are available for forward recovery. In addition, the Capture program can write the updates recorded in the logs to the change data tables that are used in DB2 data replication.
When the logretain database configuration parameter is set to Recovery, consider where to prune the logs. You can use the list backup command to display both the complete list of database backup images, and the first log file associated with each backup image. When you delete a backup image, remember to use the prune logfile to delete the logs associated with the backup image, and the prune history command to remove the record for the backup from the history file. For more information about the prune commands, refer to the Command Reference.
In this situation, the Capture program can write the updates recorded in the logs to the change data tables. When the Capture program completes, it calls the prune logfile command to delete log files when the Capture program completes. You should not set the logretain database configuration parameter to Capture if you want to perform forward recovery on the database.
If you are not using DB2 data replication on the satellite and:
[ Top of Page ]