Running a redirected recovery from an image copy
You can select an image copy to use as the source for a redirected recovery
with the RECOVER utility. If you have not already created the target table space for the
recovery, Db2® Admin Tool can
automatically create the target objects with the correct attributes for
you.The exception is if the source table space is an implicit table space. In
this case, the target objects cannot be created; you must create them manually.
Procedure
To run a redirected recovery from an image copy:
-
Navigate to the source table space (the table space that you want
to recover):
- On the DB2 Administration Menu (ADB2) panel, select option 1.
- On the System Catalog (ADB21) panel, select option S. Optionally specify any filtering criteria at the bottom of the panel, and press Enter.
- On the Table Spaces (ADB21S) panel, issue the ICS line command next to the table space for which you want to select an image copy.
-
On the Information from SYSIBM.SYSCOPY (ADB21I) panel, issue the
RF (Recover From) line command next to the image copy that you want to use as
the source.
Figure 1. Information from SYSIBM.SYSCOPY (ADB21I) panel ADB21I in DD1A Information from SYSIBM.SYSCOPY Row 1 to 3 of 3 Command ===> Scroll ===> DATA More: > Line commands: S - Table space BR - Browse image copy L - LISTCAT LD - LISTCAT data I - Interpretation RT - Recover TOCOPY RO - Recover TOCOPY with options RF - Recover FROM ? - Show all line commands S DBname PSname DSnum I ICDate ICTime DevType DSname T * * * * * * * * * -- -------- -------- ----- - ------ ------ -------- -----------------------> - DSN01102 EMP 0 I 251111 100824 3390 TS6462.DD1A.IIC.DSN01102 T RF DSN01102 EMP 0 F 251111 095613 3390 TS6462.DD1A.IC.DSN01102. T DSN01102 EMP 0 C 250710 113201 DSN01102.EMP T ******************************* END OF DB2 DATA *******************************The RF line command must be issued on an image copy, meaning that column I (for ICTYPE) must have a value of F (for full image copy) or I (for incremental image copy).
-
On the Specify TARGET for redirected recovery (ADB21IRF) panel, specify the
target table space (the table space to which you want to
redirect the recovery from the source table space), and press Enter.
Figure 2. Specify TARGET for redirected recovery (ADB21IRF) panel ADB21IRF DD1A Specify TARGET for redirected recovery 10:22 Command ===> SOURCE table space DSN01102.EMP TOCOPY 'TS6462.DD1A.IC.DSN01102.EMP' TARGET Database . . . . DSN08437 (? to look up) Table space . . EMP2 (? to look up)If the target table space does not already exist and the source is not an implicit table space, the target objects will be created for you. If the source table space is an implicit table space, you will need to create the new target objects manually.
-
If the Object does not exist (ADB21IRP) panel is displayed
(because Db2 Admin Tool is to
create the target objects for you), take the following actions:
-
Optionally specify a schema, prefix, or both for the new tables and
indexes to be created.
Figure 3. Object does not exist (ADB21IRP) panel ADB21IRP DD1A Object does not exist 12:23 The following object does not exist: database DASDB011 Schema for new objects . . . . Prefix for new object names . GEN_ Press ENTER to create a new object. Press END to skip creation and select another object. -
Press Enter.
An edit panel is displayed with the generated DDL.
-
Make any necessary edits to the DDL and issue the EXECUTE command to
run the SQL statements.
The target objects are created.
-
Optionally specify a schema, prefix, or both for the new tables and
indexes to be created.
-
On the subsequent Specify Utility Options - RECOVER (ADB2USV) panel and Specify Utility Options - REBUILD INDEX (ADB2UXB) panel, specify
any utility options that you want, and press Enter.
The utility statements are generated. For example:
RECOVER TABLESPACE DSN08437.EMP2 DSNUM ALL FROM DSN01102.EMP DSNUM ALL TOCOPY TS6462.DD1A.IC.DSN01102.EMP REBUILD INDEX(ALL) TABLESPACE DSN08437.EMP2 - Submit the generated utility job to perform the redirected recovery.