Specifying a point in time to which to recover
You can set up a batch job that will specify a particular time to which to recover the Db2 system.
Procedure
-
On the DB2 Administration Menu
(ADB2) panel, specify
Z, and press Enter.
The System Administration (ADB2Z) panel is displayed.
-
Specify option PT, and press Enter.
The System Point in Time Recovery panel is displayed, as shown in the following figure.
Figure 1. System Point in Time Recovery panel DB2 Admin------------------------- DB2X System Point In Time Recovery---- 21:04 Command ===> DSN for DSNJU003 JCL. . . . : Member name . . . . . . . . : RBA/LRSN . . . . . . . . . : BP - Change batch job parameters
-
Specify values for the following fields:
- DSN
- Member name
- The name of the data set and member in which the generated JCL is to be stored.
- RBA/LRSN
-
- To set a point in time for recovery of a non-data sharing member, specify an RBA value.
- To set a point in time for recovery of a data sharing member, specify an LRSN value.
- Press Enter. Db2 Admin Tool displays the generated JCL for the job, as shown in the following figure.
Figure 2. Example of Generated JCL for System Point in Time Recovery //* STEP PITBKUP: RUN POINT-IN-TIME BACKUP //************************************************************** //PITBKUP EXEC PGM=DSNJU003 //STEPLIB DD DISP=SHR,DSN=USER.TESTLIB // DD DISP=SHR,DSN=DSN810.SDSNLOAD //SYSUT1 DD DISP=SHR,DSN=BSDS01 //SYSUT2 DD DISP=SHR,DSN=BSDS02 //SYSPRINT DD SYSOUT=* //SYSIN DD * CRESTART CREATE,SYSPITR=BBBBBBB /*
- Edit the generated JCL to specify the appropriate BSDS data set names in //SYSUT1 and //SYSUT2.
-
Save the JCL for the batch job.
The batch job cannot be submitted directly after it is created. It cannot be run from Db2 Admin Tool.