Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Recover for Db2 13.1.

Example 8: Recovering using tape-stacked data sets


Example 8 consists of two jobs. The first job uses the BMC AMI Copy utility to stack three table spaces to different data sets on the same tape volume. The second job uses BMC AMI Recover to recover those table spaces.

Tape stacking refers to copying several small table spaces or table space partitions to different data sets on one or more tape volumes. The advantage of tape stacking is that it reduces the number of tapes needed for your image copies.

BMC AMI Recover dynamically allocates the data set and the tape volumes and avoids excessive rewinding and positioning. You do not need to specify the data sets in the JCL.

Example 8A: Making stacked image copies

The JCL in the following figure makes one full image copy of each of three table spaces, registers them, and writes them to the same cartridge tape.

JCL for making stacked image copies

//AFREX08A JOB (PAFR),'EXAMPLE 8A',
//         class="Q",NOTIFY=&SYSUID,
//         MSGCLASS=X
//*
//ACPCOPY EXEC PGM=ACPMAIN,REGION=0M,
//             PARM='DGE,EXAMPLE8A,NEW/RESET'
//STEPLIB  DD DISP=SHR,DSN=product.libraries
//          DD DISP=SHR,DSN=DB2.DSNEXIT
//          DD DISP=SHR,DSN=DB2.DSNLOAD
//SYSIN     DD *
 OUTPUT STAKTAPE
   UNIT CART
   STACK YES
   DSNAME &UID.&DB.&TS.D&DATE.T&TIME
   MODELDCB SYS1.MODEL

 COPY TABLESPACE BMCDBSMP.BMCTS001
   FULL YES
   COPYDDN(STAKTAPE)

 COPY TABLESPACE BMCDBSMP.BMCTS002
   FULL YES
   COPYDDN(STAKTAPE)

 COPY TABLESPACE BMCDBSMP.BMCTS003
   FULL YES
   COPYDDN(STAKTAPE)
/*
//SYSPRINT  DD SYSOUT=*
//

Example 8B: Recovering with stacked image copies

The JCL in the following figure performs a recovery using the three image copies.

Important

In this example, you do not need to order the RECOVER TABLESPACE statements. BMC AMI Recover orders the activities to use the data sets sequentially.

JCL for recovering with stacked cataloged image copies as input

//AFREX08B JOB (PAFR),'EXAMPLE 8B',
//         class="Q",NOTIFY=&SYSUID,
//         MSGCLASS=X
//*
//RECOVER EXEC PGM=AFRMAIN,REGION=5M,
//             PARM='DGE,EXAMPLE8B,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 *
 RECOVER TABLESPACE BMCDBSMP.BMCTS001 TOCOPY LASTCOPY
 RECOVER TABLESPACE BMCDBSMP.BMCTS002 TOCOPY LASTCOPY
 RECOVER TABLESPACE BMCDBSMP.BMCTS003 TOCOPY LASTCOPY
/*
//SYSPICK  DD SYSOUT=*
//



 

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