Use the ROLLFORWARD DATABASE command to apply transactions
that were recorded in the database log files to a restored database
backup image or table space backup image.
About this task
Do not restore table spaces without cancelling a rollforward
operation that is in progress; otherwise, you might have a table space
set in which some table spaces are in rollforward in progress state,
and some table spaces are in rollforward pending state. A rollforward
operation that is in progress will only operate on the tables spaces
that are in rollforward in progress state.
The database
can be local or remote.
The following restrictions apply
to the rollforward utility:
- You can invoke only one rollforward operation at a time. If there
are many table spaces to recover, you can specify all of them in the
same operation.
- If you have renamed a table space following the most recent backup
operation, ensure that you use the new name when rolling the table
space forward. The previous table space name will not be recognized.
- You cannot cancel a rollforward operation that is running. You
can only cancel a rollforward operation that has completed, but for
which the STOP option has not been specified, or a rollforward operation
that has failed before completing.
- You cannot continue a table space rollforward operation
to a point in time, specifying a time stamp that is less than the
previous one. If a point in time is not specified, the previous one
is used. You can issue a rollforward operation that ends at a specified
point in time by just specifying STOP, but this is only allowed if
the table spaces involved were all restored from the same offline
backup image. In this case, no log processing is required. If you
start another rollforward operation with a different table space list
before the in-progress rollforward operation is either completed or
cancelled, an error message (SQL4908) is returned. Invoke
the LIST TABLESPACES command on all database partitions (or use the
MON_GET_TABLESPACE table function) to determine which table spaces
are currently being rolled forward (rollforward in progress state),
and which table spaces are ready to be rolled forward (rollforward
pending state). You have three options:
- Finish the in-progress rollforward operation on all table spaces.
- Finish the in-progress rollforward operation on a subset of table
spaces. (This might not be possible if the rollforward operation is
to continue to a specific point in time, which requires the participation
of all database partitions.)
- Cancel the in-progress rollforward operation.
- In a partitioned database environment, the rollforward utility
must be invoked from the catalog partition of the database.
- Point in time rollforward of a table space is available only from
DB2 Version 9 clients. You should upgrade any clients running an
earlier version of the database product to Version 9 in order to roll
a table space forward to a point in time.
- You cannot roll forward logs from a previous release version.
The rollforward utility can be invoked through the command
line processor (CLP), the Restore wizard in the Control Center, or
the db2Rollforward application programming interface
(API).
Following is an example of the ROLLFORWARD DATABASE
command issued through the CLP:
db2 rollforward db sample to end of logs and stop
To
open the Restore wizard:
What to do next
Detailed information is provided through the contextual
help facility within the Control Center.