pdb_truncate_xlog

Truncates the Replication Agent primary database transaction log on demand.

  • The behavior of pdb_truncate_xlog changes based on the value of the configuration parameter pdb_include_archives:
    • When pdb_include_archives is false, triggers the archive process to archive any online redo logs that have already been processed by Replication Agent.

    • When pdb_include_archives is true, removes old archive redo log files from the path specified by pdb_archive_path.

    Note: Truncation of the old archive log files from the pdb_archive_path directory is performed only if the pdb_archive_remove parameter is set to true.
  • For UDB, if pdb_archive_remove is set to true, the archived transaction log files are removed from the location specified by the pdb_archive_path configuration parameter. The primary transaction log files will be deleted up to, but not including, the log file that contains the lsn referenced in the Replication Agent truncation point locator.

  • For Microsoft SQL Server, the primary database log is truncated. Based on the LTM locator from Replication Server, Replication Agent queries the primary database to obtain the newest transaction ID that can be truncated, and marks the transaction log space prior to the newest transaction as reusable.

For more information on how Replication Agent affects each type of database when pdb_truncate_xlog is executed, see the Replication Agent Primary Database Guide.

Syntax

pdb_truncate_xlog

Usage

  • When pdb_truncate_xlog is invoked, Replication Agent immediately truncates the primary database transaction log based on the most recent truncation point received from the primary Replication Server. The truncation point is part of the information contained in the LTM Locator.

  • To update the LTM Locator from the primary Replication Server, use the ra_locator command.

  • The pdb_truncate_xlog command is asynchronous and it does not return success or failure (unless an immediate error occurs). You must examine the Replication Agent system log to determine success or failure of the pdb_truncate_xlog command.

  • If the Replication Agent primary database log does not exist or if a connection failure occurs, the pdb_truncate_xlog command returns an error message.

  • You can use the ra_config command to specify the type of automatic truncation you want. You can use the pdb_truncate_xlog command to truncate the transaction log if automatic truncation is not sufficient to manage the size of the transaction log.

  • The pdb_truncate_xlog command is valid when the Replication Agent instance is in the Admin, Replicating, or Replication Down state.

Related reference
ra_config
ra_locator