Truncating the transaction logs

Replication Agent for UDB can be configured to truncate transaction logs from either the active or the archive log directory. When you have enabled IBM DB2 Universal Database archiving with LOGARCHMETH1, you can also configure a second archive location by setting the LOGARCHMETH2 IBM DB2 Universal Database configuration parameter. IBM DB2 Universal Database then archives logs into the two directories. You can then configure Replication Agent to automatically truncate the processed archives from one of these directories.

To configure Replication Agent to truncate logs from the archive log directory, set the following configuration parameters:

WARNING! If you enable truncation without also setting pdb_archive_path, Replication Agent deletes the primary database log files it no longer needs from the active log directory.

When IBM DB2 Universal Database truncate runs, the oldest LSN for which Replication Agent has not processed a commit/rollback (oldest active LSN) is obtained and the archive log file that contains the LSN is determined. All archive log files up to but not including the file with the oldest active LSN are deleted.

For more information on these properties see the Replication Agent Reference Manual. For a more detailed description of truncating, see “Chapter 3, Administering Replication Agent” in the Replication Agent Administration Guide. For a list of the stored procedures used for truncation, see Table 3-5.