In certain cases, you cannot use the RECOVER utility for
an image copy data set. In these cases, consider using the DSN1COPY
utility to restore the table space or data set instead.
About this task
You cannot use RECOVER TOCOPY for an image copy data set
that is not referenced by SYSIBM.SYSCOPY for that table space or data
set. An attempt to do so results in message DSNU519I "TOCOPY
DATASET NOT FOUND". The MODIFY utility might have removed
the row in SYSIBM.SYSCOPY. If the row was removed and the image copy
is a full image copy with SHRLEVEL REFERENCE, use DSN1COPY to restore
the table space or data set.
Restriction: If you use
DSN1COPY for point-in-time recovery, the table space is not recoverable
with the RECOVER utility. Because DSN1COPY runs outside of the control
of
Db2,
Db2 is not
aware that you recovered to a point in time. If possible, use DSN1COPY
to recover the affected table space after a point-in-time recovery.
Then perform the following steps:
- Remove old image copies by using the MODIFY RECOVERY utility with
the AGE option.
- Create one or more full image copies by using the COPY utility
with the SHRLEVEL REFERENCE option.
Procedure
To restore table spaces with DSN1COPY:
- Delete data in any excess partitions from the table space
before you apply the DSN1COPY utility.
You can use the DSN1COPY utility to
restore a partition or an entire table space for a partition-by-growth table space. The total number
of partitions in the DSN1COPY input data set might not be consistent with the number of partitions
that are defined on the current table space. To avoid residual data, delete data in the excess
partitions from the table space before you apply the DSN1COPY utility.
-
If the table space is organized by hash, ensure that the following values are the same in the
source and target tables spaces:
- SYSTABLESPACE.HASHDATAPAGES (IF PBG)
- SYSTABLEPART.HASHDATAPAGES (IF PBR-UTS)
-
If you are restoring an XML table space by using a data set that was generated by DSN1COPY
before DB2® 10 new-function mode, complete
the following steps before you run DSN1COPY:
-
Alter the target XML table space so that the SEGSIZE value matches the SEGSIZE value of the
original XML table space. Use the following statement:
ALTER TABLESPACE mytablespace SEGSIZE 4
-
Run the REORG TABLESPACE utility on the target XML table space.
- Run the DSN1COPY utility. Make sure that you provide the
correct sequence of image copies to DSN1COPY.
DSN1COPY
can restore the object to an incremental image copy, but it must first
restore the previous full image copy and any intermediate incremental
image copies. These actions ensure data integrity. You are responsible
for providing the correct sequence of image copies. Db2 cannot
ensure the appropriate sequence.
- Ensure
that the associated indexes are also rebuilt or restored.
This action applies to all user-defined indexes and
all indexes that are generated by Db2.
For example, this action applies to the document ID index of a table
with XML columns or the overflow index of a hash access table space.