Example 5: Recovering to a specific log point


This example illustrates two ways of recovering all parts of a table space and its indexes to a prior point in time by specifying TOLOGPOINT with the keyword LASTQUIESCE. This method allows a recovery to the last quiesce point registered for the table space in SYSIBM.SYSCOPY.

The log point specified by TOLOGPOINT LASTQUIESCE defines the point at which recovery stops. Only log records with starting log points equal to or lower than LASTQUIESCE and only image copies with log points less than LASTQUIESCE are used in the recovery.

Example 5A Using the TOLOGPOINT option with RECOVER

Example 5A uses image copies and archive and active logs to recover all partitions of the table space.

The indexes are also recovered from image copies and logs. A SYSPICK DD statement is included to obtain a list of all of the input tape and cartridge volumes that are allocated during recovery.

JCL using TOLOGPOINT with RECOVER

//AFREX05A JOB (PAFR),'EXAMPLE 5A',
//         class="Q",NOTIFY=&SYSUID,
//         MSGCLASS=X
//*
//RECOVER EXEC PGM=AFRMAIN,REGION=0M,
//             PARM='DEJM,EXAMPLE5A,NEW/RESTART,MSGLEVEL(2)'
//STEPLIB  DD DISP=SHR,DSN=product.libraries
//          DD DISP=SHR,DSN=DB2.DSNEXIT
//          DD DISP=SHR,DSN=DB2.DSNLOAD
//SYSIN     DD *
 OPTIONS INDEXLOG YES
 RECOVER TABLESPACE BMCDBSMP.BMCTS012
   TOLOGPOINT LASTQUIESCE
 RECOVER INDEX(ALL) TABLESPACE BMCDBSMP.BMCTS012
/*
//SYSPICK   DD SYSOUT=*
//

Example 5B: Using TOLOGPOINT and BACKOUT

Example 5B uses the BACKOUT feature to recover the table space and its indexes.

JCL using TOLOGPOINT and BACKOUT

//AFREX05B JOB (PAFR),'EXAMPLE 5B',
//         class="Q",NOTIFY=&SYSUID,
//         MSGCLASS=X
//*
//RECOVER EXEC PGM=AFRMAIN,REGION=0M,
//             PARM='DEJM,EXAMPLE5B,NEW/RESTART,MSGLEVEL(2)'
//STEPLIB  DD DISP=SHR,DSN=product.libraries
//          DD DISP=SHR,DSN=DB2.DSNEXIT
//          DD DISP=SHR,DSN=DB2.DSNLOAD
//SYSIN     DD *
 OPTIONS INDEXLOG YES
 RECOVER TABLESPACE BMCDBSMP.BMCTS013
   TOLOGPOINT LASTQUIESCE
   BACKOUT
 RECOVER INDEX(ALL) TABLESPACE BMCDBSMP.BMCTS013
//


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*