The Mirror Replication Agents for ASE and Oracle support both automatic and manual transaction log truncation.
You can enable or disable automatic log truncation at any time, and you can truncate the Mirror Replication Agent transaction log manually at any time, with automatic log truncation either enabled or disabled.
Depending on the type of database and the Mirror Replication
Agent configuration, Mirror Replication Agent truncates either the
database online logs or archive logs. Sybase recommends that you
configure Mirror Replication Agent to truncate the database archive
logs. See the Mirror Replication Agent Primary Database
Guide for details.
When the Mirror Replication Agent truncates its transaction log, either automatically or on command (manually), the truncation point is determined by the most recent LTM Locator received from the primary Replication Server.
You have two options for automatic transaction log truncation:
Automatic truncation each time the Mirror Replication Agent receives a new LTM Locator value from the primary Replication Server
Periodic truncation on a time interval you specify
Mirror Replication Agent 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.
Enabling automatic log truncation
Log in to the Mirror Replication Agent instance with the administrator login.
Use the ra_config command to enable automatic log truncation and specify the type of automatic truncation:
Use the following commands to enable automatic log truncation at a specified time interval:
ra_config truncation_type, interval
ra_config truncation_interval, N
Here, N is the number of minutes between automatic truncations.
The maximum truncation_interval value
is 720.
Use the following command to enable automatic log truncation whenever the Mirror Replication Agent receives a new LTM Locator value from the primary Replication Server:
ra_config truncation_type, locator_update
See the Mirror Replication Agent Reference Manual for more information about the truncation_interval and truncation_type configuration parameters.
Disabling automatic log truncation
Log in to the Mirror Replication Agent instance with the administrator login.
Use the ra_config command to disable automatic log truncation:
ra_config truncation_type, command
If the value of the truncation_type parameter
is interval, and the value of the truncation_interval parameter
is 0 (zero), automatic log truncation is effectively
disabled.
If automatic log truncation is disabled, you must periodically truncate the Mirror Replication Agent transaction log manually.
Truncating the Mirror Replication Agent transaction
log manually
Log in to the Mirror Replication Agent instance with the administrator login.
Use the following command to truncate the Mirror Replication Agent transaction log:
pdb_truncate_xlog
The pdb_truncate_xlog command is asynchronous; it does not return success or failure, unless an immediate error occurs.
See the Mirror Replication Agent Reference Manual for more information about the pdb_truncate_xlog command.
As an alternative to the Mirror Replication Agent automatic
log truncation feature, use a scheduler utility to execute the pdb_truncate_xlog command
in a script.