Truncates the Sybase Replication Agent transaction log on demand. Based on the target database the transaction log is processed differently:
For Oracle, the behavior of this command changes based on the value of configuration parameter pdb_include_archives:
When pdb_include_archives is false, this command triggers the Oracle archive process to archive any on-line redo logs that have already been processed by Sybase Replication Agent for Oracle.
When pdb_include_archives is true, removes old archive redo log files from the path specified by pdb_archive_path.
.
For Oracle, truncation of the old archive log files
from the pdb archive path directory is performed
only if the pdb_archive_remove property
is set to true.
For trigger-based Replication Agent for Microsoft SQL Server, the tran log table and shadow tables are truncated.
For Replication Agent for UDB, the primary database log files will be deleted up to, but not including, the log file that contain the lsn found in the current truncation point.
WARNING! For UDB, the Replication Agent deletes the primary database log files that it no longer needs. For more information, see the Sybase Replication Agent Primary Database Guide
For more information on how Sybase Replication Agent affects each type of database when pdb_truncate is executed, see the Sybase Replication Agent Primary Database Guide
pdb_truncate_xlog
When pdb_truncate_xlog is invoked, Sybase Replication Agent immediately truncates the 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.
You can use the ra_statistics command to view the “Number of transactions truncated” both before and after you use the pdb_truncate_xlog command.
If the Sybase Replication Agent transaction 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 Sybase Replication Agent instance is in either Admin or Replicating state.