Using INDEXES with the TABLESPACE specification


You can create index image copies by using the INDEXES keyword with the TABLESPACE specification with the COPY or COPY IMAGECOPY commands. In this case, the indexes associated with the specified table spaces are copied.

If the IXSIZE option is non-zero, only indexes that exceed IXSIZE are copied. For more information, see Copying-indexes-based-on-size.

When INDEXES YES is used with COPY TABLESPACE, all indexes for the table space(s) in the TABLESPACE specification are copied. 

The use of INDEXES YES requires dynamic allocation because each copy command includes only one COPYDDN and RECOVERYDDN specification. When INDEXES NO, the default value, is used, BMC AMI Copy uses the TABLESPACE options.

If INDEXES YES is specified with a TABLESPACE that is using DSNUM, the value of the IXDSNUM installation option works with the value of DSNUM to determine how BMC AMI Copy makes the index copies. For more information about IXDSNUM description, see IXDSNUM=ALL. The IXDSNUM installation option can be overridden at runtime by specifying IXDSNUM on the OPTIONS command (see OPTIONS-syntax-option-description).

Indexes for a table space are copied immediately after the table space. The indexes are copied in alphanumeric order and data set order. INDEXES YES implies grouping with the TABLESPACE.

COPY IMAGECOPY TABLESPACE can also use the INDEXES keyword. If INDEXES YES is used, copies of the index copies associated with the table space copies are made. CHECKTSLEVEL, CHECKERROR, and SQUEEZE are ignored for the indexes. Dynamic allocation is required because only one COPYDDN or RECOVERYDDN can be specified.

If the EXCLUDE keyword is used with either COPY TABLESPACE or COPY IMAGECOPY TABLESPACE, EXCLUDE processing is done in two passes. The first pass excludes table spaces from the Object List. Indexes are not copied using INDEXES YES if the table space is excluded from the list. A second pass of the EXCLUDE list is done after INDEXES YES is expanded so that indexes can be excluded by name.

 

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

BMC AMI Copy for Db2 13.1