Previous Topic Next topic Print topic


ROLLFORWARD

ROLLFORWARD allows users to roll forward the transactions stored in supplied log files to a specified location. This command must be run while in exclusive use mode.
Restriction: This topic applies to Windows environments only.

Invocation

ROLLFORWARD can be executed interactively, embedded in a host language, or dynamically prepared.

Authorization

To use the ROLLFORWARD command you must be a super user.

Syntax

ROLLFORWARD location-name USING log-file-path

Parameters

location-name Identifies the location to be recovered.
log-file-path Specifies the directory containing the log files that need to be applied to the appropriate location. These log files must have been created as the result of a standard or incremental BACKUP command.

Description

The ROLLFORWARD command is used to roll forward transactions contained in log files for a specified location. These log files must have been created by a standard or incremental BACKUP command.

The ROLLFORWARD command is used when a media or disk failure has occurred. After placing a backup of a location back on disk, ROLLFORWARD commands specifying the appropriate log files can bring the backup location up to date, so that its state is consistent with the location at the time of the crash.

After performing a standard backup (which is mandatory for all recovery scenarios), which type of backup you perform is up to you. Always performing standard backups takes longer than performing incremental backups but the recovery process from them is much easier and quicker. Performing incremental backups is quicker than performing standard backups but more ROLLFORWARD steps might be necessary to recreate your location.

Resetting Logging System

The XDB Server's logging system automatically creates a series of log files when a new location is created. For an existing location, logging should be manually reset as a part of the location backup process.

Follow the steps below to manually reset location logging:

  1. Shut down server.
  2. Copy log files from the location logging directory to a separate archive directory.
  3. Depending on whether you are using the BACKUP LOCATION command or an operating system backup command, do one of the following:
    • Bring the server back up and run the BACKUP LOCATION command from SQLWizard (be sure you execute the BACKUP LOCATION command from a location other than the one you are backing up).
    • Run your operating system (or other) backup utility as appropriate (be sure to archive all directories associated with the XDB Server location).
  4. Shut down the server (if using BACKUP LOCATION).
  5. Delete all log files (*.LOG) from your location logging directory. The next time the location is accessed, a fresh series of log files will automatically be created by the logging system.

COMPACT Commands

Since using a COMPACT command on a location renders that location's current log files useless, a location should be backed up (and the log files for that location reset) immediately after any COMPACT commands are issued against that location. Log files contain internal information that maps to a particular table structure. COMPACT commands alter the table structure of the location, changing this log-to-table mapping, and making ROLLFORWARD with the previous log files impossible.

Example

The following command rolls forward the transactions in MYLOC, using the log files specified in d:\backuplocs\xdb20051017151315000001:

ROLLFORWARD MYLOC USING D:\BACKUPLOCS\XDB20051017151315000001
Previous Topic Next topic Print topic