Loading...

Reapplying the Log Files (Roll-Forward)

When you have log files that contain transactions that are not part of the backup that you want to restore, you can reapply the log files. You can reapply the log files after you restore a database or a table from a backup image.

Note: You cannot use the roll-forward option when you recover (Restore Options dialog box, Recover Database tab, Recover DB check box) the database.

Before you roll-forward the log files on the restored database, you must enable the DB2 userexit database configuration parameter.

You can reapply the log files to the following:

  • The end of the log file: This applies to all the log files

  • A specified time: This options applies the log files to the time that you specify

When you use the roll-forward option to restore the log files, DB2 searches for the following target restore paths:

  • The DB2 directory path for log file restores

  • The retrieve path that you specified when you installed the DB2 Agent

  • The archive path that you specified when you installed the DB2 Agent

  • The overflow path identified (if any) in the Overflow Directory field within the roll-forward

If DB2 cannot find any of these paths, it enters an error in a file within the DB2 audit error path that you specified when you installed the DB2 Agent.

The SnapProtect software waits 2 minutes for the SnapProtect operation to complete. If the job does not complete when this time expires, the SnapProtect software marks the job as failed and brings the database out of the quiesced state. You can set this to a higher value to allow more time for the job to complete. For more information, see Configuring the time the SnapProtect Software Waits for the SnapProtect Operation.

Procedure

  1. From the CommCell Browser, expand Client Computers > client > DB2 > instance.
  2. Right-click the backup_set, point to All Tasks, and then select Browse and Restore.
  3. From the Browse window, select the tables to restore, and then click Recover All Selected.

    The Restore Options dialog box appears.

  4. On the Recover Database tab, clear the Recover DB check box.
  5. Click Advanced.

    The Advanced Restore Options dialog box appears.

  6. On the Roll-Forward tab, do the following:
    1. Select the Roll-forward (Reapply the Logs) check box.
    2. Select the roll-forward options that you want to use.
      Option Steps
      To the End of the logs
      1. Select To the End of the logs.
      2. If the client is in a different time zone from the CommServe computer, select the destination time zone from the Time Zone list.
      To a Point in Time
      1. Select To a Point in Time.
      2. Select the date and time to reapply the log files to.
      3. If the client is in a different time zone from the CommServe computer, select the destination time zone from the Time Zone list.
    3. To leave the database in a pending state until all the log files are applied, select the Leave in Roll-forward Pending State check box.
    4. To restore the log files that are in the overflow directory, select the Overflow Directory check box, and then type the name of the directory in the box.
    5. To reapply and restore the log files to an alternate log path, select the Alternate Log Path check box, and then type the name of the directory in the box.
    6. Click OK.
  7. Click OK.