Truncating the Mirror Replication Agent transaction log

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.

NoteThe Mirror Replication Agent for Oracle supports transaction log truncation by controlling archive operations against the Oracle redo log and archive log files. 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.

Automatic truncation

You have two options for automatic transaction log truncation:

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.

StepsTo enable automatic log truncation

  1. Log in to the Mirror Replication Agent instance with the administrator login.

  2. Use the ra_config command to enable automatic log truncation and specify the type of automatic truncation:

  3. If you enabled automatic log truncation based on a time interval, use ra_config to specify the time interval for automatic truncation:

    ra_config truncation_interval, N
    

    where N is the number of seconds between automatic truncations.

    NoteThe maximum truncation_interval value is 720.

See the Mirror Replication Agent Reference Manual for more information about the truncation_interval and truncation_type configuration parameters.

StepsTo disable automatic log truncation

  1. Log in to the Mirror Replication Agent instance with the administrator login.

  2. Use the ra_config command to disable automatic log truncation:

    ra_config truncation_type, command
    

NoteIf 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.

Manual truncation

If automatic log truncation is disabled, you must periodically truncate the Mirror Replication Agent transaction log manually.

StepsTo truncate the Mirror Replication Agent transaction log manually

  1. Log in to the Mirror Replication Agent instance with the administrator login.

  2. 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.

NoteAs 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.