Configuring Log Truncation With Disaster Recovery (DR) Backups

Disaster Recovery (DR) backups can be configured to check and truncate logs whenever a DR backup is performed. This will prevent SQL Server logs from continuous growth and potentially running out of space.

By default, logs for all databases are not truncated.

Before You Begin

Make sure that the databases included in the DR backup is set to 'Full' Recovery Model as follows:

  1. Open SQL Management Studio.

  2. Right Click the database and then click Properties.

  3. Click Options in the left pane.

  4. Select the Full option from the Recovery model list.

  5. Click OK.

Note

If CommServe Failover is enabled using the CommServe Failover Configuration, the databases are automatically set to the 'Full' Recovery Model.

Procedure

  1. To the CommServe computer, add the nMinDBLogUsage additional setting as shown in the following table.

    For instructions on adding additional settings from the CommCell Console, see Adding or Modifying Additional Settings from the CommCell Console.

    Property

    Value

    Name

    nMinDBLogUsage

    Category

    Database

    Type

    Integer

    Value

    80

    Tip

    The default value of 80 indicates that the backup will be converted to a full backup when any one of the log files, associated with the databases selected in the DR Backup options, reaches 80% of the total allocated size. If necessary you can modify this value.

Result

The log file size associated with databases selected in the DR Backup will be checked, whenever a DR Backup job is run.

The following actions will be triggered if the log file is equal to or greater than the specified percentage in any one of the databases.

  • If it is a differential backup job, it will be automatically converted to a Full DR backup.

  • A full backup of all the transaction logs and databases that were selected in the DR Backup will be performed.

    The full backup will include a full backup of all the transaction logs and databases that were selected in the DR Backup options. (For more information on running DR Backups, see Performing Disaster Recovery (DR) Backups.)

  • The corresponding log files will be truncated.

Loading...