-BMCV (BMC AMI Recover utility)


The -BMCV command invokes the 

BMC AMI Recover for Db2

 utility.

This command and its parameters are passed to BMC AMI Recover without any processing. You can run the BMC AMI Recover utility to perform the following functions:

  • Rebuild indexes
  • Load from image copies
  • Dynamically allocate copy data sets
  • Register image copies
  • Create partition-level image copies
  • Migrate image copy data

Use of -BMCV to rebuild indexes

The -BMCV command can invoke BMC AMI Recover to rebuild an index.

Example of -BMCV command—rebuild index

-BMCV 000350
             REBUILD INDEX (RDAJZB.IXNS1CN0)
                NOWORKDDN
             REDEFINE NO

Important

If the PIECESIZE attribute is altered and an index is rebuilt, the REDEFINE NO parameter is not used in the -BMCV command.

If a cloned table exists for a base table, and an index is being created for the base table, new indexes on tables with clones are marked DEFER YES in the create statement, and the CLONE keyword is added to the -BMCV REBUILD INDEX statement.

Example of -BMCV command—rebuild index clone

-BMCV 000450                                         
   REBUILD INDEX (RJCLONE3.I_T02PBG)                 
               CLONE                                 
                  NOWORKDDN                       
             REDEFINE NO

Use of -BMCV to load from image copies

The -BMCV command can invoke BMC AMI Recover to migrate data by using an image copy.

Example of -BMCV command—BMC AMI Recover copy

-BMCV 000760
       RECOVER TABLESPACE JFLDB01.JFLPT02A
               DSNUM 2
            INCOPY FULL
              DSNAME JFL.JFLPT02.PT2
            TOCOPY LASTCOPY
       RECOVER TABLESPACE JFLDB01.JFLPT02A
               DSNUM 1
            OBIDXLAT RESET DBID (276,)
               PSID (52,)
               OBID (55,)
            INCOPY FULL
               DSNAME JFL.JFLPT02.PT1
            TOCOPY LASTCOPY
       REBUILD INDEX(ALL) TABLESPACE JFLDB01.JFLPT02A NOWORKDDN                DBID 276,NEWDB=JFLDB01
               PSID 52,NEWTS=JFLPT02A
               OBID 55,NEWTB=JEFFZ.TBPT02

Use of -BMCV to dynamically allocate copy data sets

The BMC AMI Recover utility can dynamically allocate the data sets that are used to create valid image copies.

JCL Generation uses the symbolic variable that is specified in the JCL Generation Data Set Options for Copies panels to create an OUTPUT descriptor for Analysis. When generating the -BMCV command, Analysis specifies an OUTPUT descriptor for local and recovery primary and backup copies. The DSNAME parameter in the descriptor specifies the data set name for the object that is copied.

Example of -BMCV command—dynamic allocation of data sets

-BMCV 000850
    OUTPUT DCPYLOCP
      UNIT CART
    DSNAME RDAMCG.&UTIL.A.&TS
    STACK YES
    VOLCNT 99
    OUTPUT DCPYLOCB
      UNIT CART
    DSNAME RDAMCG.&UTIL.B.&TS
    STACK YES
    VOLCNT 99
    OUTPUT DCPYREMP
      UNIT CART
    DSNAME RDAMCG.&UTIL.C.&TS
    STACK YES
    VOLCNT 99
              RECOVER TABLESPACE ACMX01.X05SSJ
                OBIDXLAT RESET DBID (3209,)
                    PSID (34,)
                    OBID (35,)
                INCOPY FULL
                  DSNAME RDAMCG.DEAH.ACMX01.X05SS.D0418A
                OUTCOPY YES
                     REGISTER DCPYLOCP,DCPYLOCB,DCPYREMP
                     OUTCOPYDDN  (DCPYLOCP,DCPYLOCB)
                     RECOVERYDDN (DCPYREMP)
                TOCOPY LASTCOPY
              REBUILD INDEX(ALL) TABLESPACE ACMX01.X05SSJ NOWORKDDN
              DBID 3209,NEWDB=ACMX01
              PSID 34,NEWTS=X05SSJ
              OBID 35,NEWTB=ACMX01.T_X05SSJ

If the table spaces or indexes are partitioned, the P&PART symbolic variable is used in the DSNAME parameter to ensure that the data set name for each object is unique for partition-level image copies.

Important

If you select to use BMC AMI Recover to dynamically allocate copy data sets and to build image copies, the data sets cannot be stacked.

Use of -BMCV to register image copies

If any of the four image copies (primary and backup copies for the local and remote sites) are registered, Analysis inserts the REGISTER DDName parameter.

Use of -BMCV to dynamically allocate copy data sets shows an example of the -BMCV worklist command with the REGISTER parameter. If none of the image copies are registered, Analysis inserts the REGISTER NONE parameter.

Use of -BMCV to create partition-level image copies

Analysis can generate parameters for a partition-level image copy of a partitioned table space or index in a database when you select to use BMC AMI Recover.

The following example shows the -BMCV command that is used when partition-level image copies are requested for a database that contains a table space that has four partitions. The OPTION parameter indicates that the utility is copying the table space by partition.

Example of -BMCV command—partition-level image copies

-SPAC 002250 DDNAME C001 BMCV TS C7PCA1.TS36P4
-JCLP 002300 BMCV NUMPARTS 4
-BMCV 002350
            OPTION OUTCOPY BYPART
            RECOVER TABLESPACE C7PCC1.TS36P4
                   DSNUM 4
              INCOPY FULL
                DSNAME RDACEL.CPIDEBA.C7PCA1.TS34P4.P04.D0613B
              OUTCOPY YES
                   REGISTER C001
                   OUTCOPYDDN  (C001)
              TOCOPY LASTCOPY
            RECOVER TABLESPACE C7PCC1.TS36P4
                   DSNUM 3
              INCOPY FULL
                DSNAME RDACEL.CPIDEBA.C7PCA1.TS33P3.P03.D0613B
              OUTCOPY YES
                   REGISTER C001
                   OUTCOPYDDN  (C001)
              TOCOPY LASTCOPY
            RECOVER TABLESPACE C7PCC1.TS36P4
                   DSNUM 2
              INCOPY FULL
                DSNAME RDACEL.CPIDEBA.C7PCA1.TS33P3.P02.D0613B
              OUTCOPY YES
                   REGISTER C001
                   OUTCOPYDDN  (C001)
              TOCOPY LASTCOPY
            RECOVER TABLESPACE C7PCC1.TS36P4
                   DSNUM 1
              OBIDXLAT RESET DBID (1612,)
                   PSID (30,)
                   OBID (59,)
              INCOPY FULL
                DSNAME RDACEL.CPIDEBA.C7PCA1.TS33P3.P01.D0613B
              OUTCOPY YES
                   REGISTER C001
                   OUTCOPYDDN  (C001)
              TOCOPY LASTCOPY
            REBUILD INDEX(ALL) TABLESPACE C7PCC1.TS36P4 NOWORKDDN
            DBID 1612,NEWDB=C7PCC1
            PSID 30,NEWTS=TS36P4
            OBID 59,NEWTB=C7PCC1C.TB36A

For more information, see BMC AMI Recover for Db2 documentation.

Use of -BMCV to migrate image copy data

The BMC AMI Copy for Db2  EXPORT command and BMC AMI Recover IMPORT command enable you to migrate an image copy or set of image copies within a Db2 subsystem or to another Db2 subsystem.

The EXPORT and IMPORT commands comprise the Copy Migration feature of the following solutions:

  • Recovery Management for Db2
  • BMC AMI Recovery for Db2
  • BMC AMI Database Administration for Db2
  • Next Generation Technology Database Administration for DB2
  • BMC Database Administration for DB2

BMC AMI Change Manager for Db2 invokes the BMC AMI Recover IMPORT command on the receiving subsystem during phase 2 of the migration to migrate all the image copy data to the receiving table space that is identified by the command. The IMPORT command uses the object identifiers found in the EXPORT command’s migration file and translates them to the object identifiers found in the receiving catalog.

Example of -BMCV command—IMPORT command

-BMCV 000800      
     IMPORT USING RDADQL.DEGA.WORKIDXX.EX000001
     CHANGE TABLE FROM RDADQL. TB07090A1
                    TO RDADQL2. TB07090A1
     CHANGE TABLE FROM RDADQL. TB07090B1
                    TO RDADQL2. TB07090B1
     CHANGE TABLE FROM RDADQL. TB07090C1
                    TO RDADQL2. TB07090C1
     CHANGE TABLE FROM DQ2CLG2.T_T03PBGY
                    TO DQ2CLG4.T_T03PBGY4
     INDEXES NO
     SYNC REPLACE
     RESET
     UPDATE VERSIONS

-BMCV 000850      
     IMPORT USING RDADQL.DEGA.WORKIDXX.EX000002
     CHANGE TABLE FROM RDADQL. TB07090A1C
                    TO RDADQL2. TB07090A1C
     CHANGE TABLE FROM RDADQL. TB07090B1C
                    TO RDADQL2. TB07090B1C
     CHANGE TABLE FROM RDADQL. TB07090C1C
                    TO RDADQL2. TB07090C1C
     CHANGE TABLE FROM DQ2CLG2.T_T03PBGYC
                    TO DQ2CLG4.T_T03PBGY4C
     INDEXES NO
     SYNC REPLACE
     RESET
     UPDATE VERSIONS
     CLONE

-BMCV 003700                                
    OUTPUT DCPYLOCP                         
      UNIT SYSDA                            
    DSNAME &UID.DQC10056.&TS.P&PART.LP000001

  IMPORT USING RDADQL1.DQC10056.EX000001    

               INDEXES NO                   
               SYNC REPLACE                 
               RESET
               UPDATE VERSIONS                

               OUTCOPY YES                  
                    REGISTER DCPYLOCP       
                    OUTCOPYDDN  (DCPYLOCP)

The IMPORT command uses the following options. For more information, see BMC AMI Recover for Db2 documentation.

Option

Notes

CHANGE TABLE FROM TO

Explicitly lists the tables that have a change to the creator or name

INDEXES

Specifies how BMC AMI Recover should handle indexes using the IMPORT command:

  • INDEXES AUTO specifies that BMC AMI Recover recovers indexes if the information is available for them in the migration data set. Any index not in the migration data set, but defined on the target system is rebuilt. This is the default value.
  • INDEXES RECOVER specifies that indexes on the target system are recovered if they have entries in the migration data set.
  • INDEXES REBUILD specifies that all indexes on the target system are rebuilt regardless of whether they have entries in the migration data set.
  • INDEXES NO specifies that indexes on the target system are left unchanged.

SYNC

Specifies whether the migration file should include all spaces in the IMPORT command or only those spaces that have changed since the last migration

  • REPLACE replaces all table spaces regardless of whether they have changed or not.
  • AUTO replaces only table spaces that have changed since the last time those table spaces were imported.

RESET

Instructs BMC AMI Recover to reset the recovery log points in each data page to 0

The log points must be reset when you are migrating data from one Db2 non-data-sharing subsystem to another subsystem because the log point values on the sending subsystem could be meaningless or misleading to the receiving subsystem.

OUTCOPY YES

Instructs BMC AMI Recover to take an image copy of the table spaces during the processing of the IMPORT command

Change Manager generates this option in the worklist when you select the UTILCOPY Analysis override option. The image copy data sets are dynamically allocated.

CLONE

Instructs BMC AMI Recover to import clone table data

After invoking the BMC AMI Recover IMPORT command, Change Manager invokes the BMC AMI Recover REBUILD INDEX command to re-create the indexes and auxiliary indexes. If the table space is created implicitly, the character T precedes the command text. Execution looks up the table space name during processing and substitutes it for the table name before invoking the utility.

Example of -BMCV command—T form of REBUILD INDEX

-BMCV 000850                             
             T REBUILD INDEX(ALL)        
  TABLESPACE RDADQL TB07090E1            

               AUX LOB                   
                     NOWORKDDN           
             REDEFINE NO

Related topic




 

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