Replication Agent for UDB can be configured to truncate transaction logs from either the active or the archive log directory. When you have enabled UDB archiving with LOGARCHMETH1, you can also configure a second archive location by setting the LOGARCHMETH2 UDB configuration parameter. UDB 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:
Set pdb_archive_path to point to the location specified by either LOGARCHMETH1 or LOGARCHMETH2.
Set pdb_archive_remove to true if you want Replication Agent to delete the archives that are no longer necessary.
By default, the pdb_archive_remove property
is set to false. You must configure the pdb_archive_path property
before setting pdb_archive_remove to true.
To enable automatic truncation, set truncation_type to interval, and set truncation_interval to a value greater than “0” (zero), which will cause the log files to be deleted at the designated interval. Alternately, set truncation_type to locator_update, which causes truncation to occur each time Replication Agent receives a new LTM Locator value from the primary Replication Server.
For manual truncation, execute the Replication Agent pdb_truncate_xlog command, which causes Replication Agent to immediately truncate the transaction log based on the most recent truncation point received from the primary Replication Server.
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 UDB 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.