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.

RECOVER UNLOADKEYS command


The RECOVER UNLOADKEYS and RECOVER BUILDINDEX commands work together but in separate executions. RECOVER UNLOADKEYS extracts from the table space the index keys that RECOVER BUILDINDEX uses to build nonpartitioned indexes on a partitioned table space.

RECOVER UNLOADKEYS specifies nonpartitioned indexes on a partitioned table space and specifies one partition of the table space from which the keys for those indexes are extracted. The keys are written to data sets which are specified in a RECOVER BUILDINDEX command statement in a subsequent job. The keys within these data sets are sorted during the RECOVER UNLOADKEYS processing or the RECOVER BUILDINDEX.

To extract keys from multiple partitions, you use multiple RECOVER UNLOADKEYS command statements. You can include these with RECOVER TABLESPACE and REBUILD INDEX command statements.

Important

If you request simulation mode with the SIMULATE YES option, which requires a valid Recovery Management for Db2 solution password, you must use SIMRCVR UNLOADKEYS rather than RECOVER UNLOADKEYS.

This section describes the syntax of the RECOVER UNLOADKEYS command and its options.

Important

RECOVER UNLOADKEYS ignores the MAXKSORT option and processes as if you specified MAXKSORT=1. If you also specify a REBUILD INDEX for the partitioning index and specify a MAXKSORT value of at least 3, BMC AMI Recover uses a separate sort for the partitioning index and does the REBUILD INDEX for the partitioning index in parallel with RECOVER UNLOADKEYS.

RECOVER UNLOADKEYS syntax

The following figure shows the syntax of the RECOVER UNLOADKEYS command.

GUID-4EC66246-5CA3-42A0-95F0-1BD4539F2E63-low.png

RECOVER UNLOADKEYS option descriptions

BMC AMI Recover provides the following options for use with the RECOVER UNLOADKEYS command. The options are described in the order in which they are shown in the ß UNLOADKEYS syntax diagram.

Option

Description

RECOVER for RECOVER UNLOADKEYS

Use the RECOVER command when you want to perform an actual recovery.

SIMRCVR for RECOVER UNLOADKEYS

SIMRCVR is a synonym for the RECOVER command. Use the SIMRCVR keyword to clarify that you are running in simulation mode. When you use SIMRCVR, you must also specify OPTIONS SIMULATE YES, which requires a valid BMC Recovery Management for Db2 solution password.

For more information, see SIMULATE-YES.

UNLOADKEYS

UNLOADKEYS specifies one or more indexes for which keys and row IDs are to be extracted.

All specified indexes must be nonpartitioned indexes on the table of a partitioned table space.

(indexName1indexName2, . . . . . )

This specifies each of the indexes for which keys and row IDs are to be extracted. Each index name is in the form authid.indexName. If you do not provide the authid qualifier, the qualifier is defaulted to the user ID of the user executing the utility. You must enclose the list of qualified names in parentheses.

Important

RECOVER UNLOADKEYS does not support indexes defined using an expression.

Value

Description

PART integer

This parameter specifies the partition of the index for which keys and row IDs are to be extracted.

PART begin : end

Use this option to recover a range of partitions for the index space. For partitioned index spaces, begin specifies the number (from 1 through 4095) of the first partition in the range and end specifies the number (from 2 through 4096) of the last partition in the range. The two numbers are separated by a colon (:) with or without spaces. Wrapping partition numbers (for example, DSNUM 4050 : 300) is not supported.

ALL

UNLOADKEYS(ALL) specifies that keys and row IDs are to be extracted for all nonpartitioned indexes on the table space named in the TABLESPACE option.

TABLESPACE databaseName.tableSpaceName for RECOVER UNLOADKEYS

The TABLESPACE option specifies the partitioned table space from which keys and row IDs are to be extracted for the nonpartitioned indexes specified by the UNLOADKEYS option. If you specify UNLOADKEYS(ALL), you must also specify TABLESPACE. If you specify UNLOADKEYS(indexName1, . . . . . ) and do not specify TABLESPACE, BMC AMI Recover determines the table space for the first index specified. All other specified indexes must belong to the same table space.

  • databaseName is the name of the database to which the table space belongs. The default is DSNDB04. The name cannot be DSNDB01, DSNDB06, DSNDB07, or any database defined with TYPE='W' in SYSIBM.SYSDATABASE
  • tableSpaceName is the name of the table space from which nonpartitioned index keys are to be extracted. BMCUTIL and BMCSYNC, tables that are used by BMC utilities, cannot be used.

PART for RECOVER UNLOADKEYS

The PART option specifies the partitions of an index on a partitioned table space to unload. You can specify the index partition individually in the main body of the RECOVER UNLOADKEYS command or in a list by using the INDEX (indexName1, indexName2...) option, but you cannot specify the partition in both places. If you specify the partition by using the RECOVER UNLOADKEYS command statement, you can place the partition specification before or after the TABLESPACE option.

Value

Description

PART integer

PART integer specifies the partition of the table space from which the keys and row IDs are extracted. You must always specify this option with RECOVER UNLOADKEYS.

integer must be in the range 1 through 4096.

You can place the partition specification before or after the TABLESPACE option. You can specify a partition individually in the main body of the RECOVER UNLOADKEYS command statement or in a list by using the UNLOADKEYS (indexName1, indexName2...) option, but you cannot specify the partition in both places.

PART begin : end

Use this option to recover a range of partitions for the index space. For partitioned index spaces, begin specifies the number (from 1 through 4095) of the first partition in the range and end specifies the number (from 2 through 4096) of the last partition in the range. The two numbers are separated by a colon (:) with or without spaces. Wrapping partition numbers (for example, DSNUM 4050 : 300) is not supported.

INDEPENDENT INTABLESPACE

Use the INDEPENDENT (or INDEP) INTABLESPACE option to specify that the nonpartitioned index keys and row IDs are to be extracted from a table space data set other than the one that is used by Db2. If the independent data set is one of your own choosing that you previously created, you must specify the name of that data set with the MODEL option. If you do not specify a name, BMC AMI Recover assumes the BMC AMI Recover data set name model to construct the data set name:

(vcat.BMCDBC.databaseName.indexSpaceName.p0001.znnn)

The variables are defined as follows:

  • vcat is the ICF catalog name.
  • databaseName.indexSpaceName is the name of the database and index space containing the data set being rebuilt.
  • p corresponds to the value that is used by Db2 for this node.
  • znnn is the data set number.

    z represents the letter A, B, C, D, or E. These letters correspond to the first digit--0, 1, 2, 3, or 4--of the partition number. nnn represents the rest of the partition number. znnn represents the partitions numbers as follows:

    • A001 through A999 for partitions 1 through 999
    • B000 through B999 for partitions 1000 through 1999
    • C000 through C999 for partitions 2000 through 2999
    • D000 through D999 for partitions 3000 through 3999
    • E000 through E096 for partitions 4000 through 4096

    If you specify a RECOVER TABLESPACE command (for the table space associated with this index) by using INDEP OUTSPACE in the same SYSIN stream as this RECOVER UNLOADKEYS command and you specify INDEP INTABLESPACE, any data set name specified must be the same as the name used with INDEP OUTSPACE in the RECOVER TABLESPACE command. If you do not include a data set name, BMC AMI Recover assumes that data set that is named in INDEP OUTSPACE. If you also do not specify INDEP INTABLESPACE, BMC AMI Recover still uses the independent table space data set that is named in the RECOVER TABLESPACE command to extract the keys.

    When you use INDEP INTABLESPACE, you must specify it immediately after the TABLESPACE specification, as shown in RECOVER UNLOADKEYS syntax.

    For information about using redirection with multiple BMC AMI Recover commands, see Recovering to a non-DB2 data set. For more information about some applications of this feature, see Testing-recovery-with-simulation.

Value

Description

MODEL

Use the MODEL option following INDEP INTABLESPACE to specify an existing non Db2 data set from which the nonpartitioned index keys and row IDs are to be extracted. This non Db2 data set was previously used to receive the output from the recovery of the associated table space.

CLONE for RECOVER UNLOADKEYS

The CLONE option indicates that BMC AMI Recover is to recover clone table or index data. When you recover with clone data, the following limitations apply:

  • You cannot refer to the same object with the CLONE option and without the CLONE option in the same recovery step; you cannot process the base and its clone in the same command.
  • Related objects (table space and all indexes for its table, all related LOB objects) should use the same CLONE specification in the same recovery step.

SKEYDDN

Use the SKEYDDN option to specify the ddname for the unloaded keys work data set that is to be used to hold the sorted keys and row IDs. The default ddname is SKEY. The maximum length of the ddname specified by SKEYDDN is eight characters. Certain restrictions apply to this option, as follows:

  • If you use multiple RECOVER UNLOADKEYS command statements for a table space, the ddname that you specify for SKEYDDN must be the same in all of the statements.
  • If you use other RECOVER UNLOADKEYS command statements for other table spaces or other REBUILD INDEX command statements for other table spaces, any value you specify for SKEYDDN with those statements must be different.
  • If you use RECOVER UNLOADKEYS and REBUILD INDEX command statements for a table space, REBUILD INDEX defaults to NOWORKDDN if you specify SKEYDDN.
  • Do not use data sets created with SIMRCVR UNLOADKEYS except with SIMRCVR BUILDINDEX.

SORTDEVT and SORTNUM sort work data set options for RECOVER UNLOADKEYS

To sort index keys, BMC AMI Recover invokes BMCSORT, which allocates the required temporary sort work data sets. You can take one of the following courses of action:

  • Specify SORTNUM and SORTDEVT to direct the allocation.
  • Specify neither SORTNUM nor SORTDEVT, and let BMCSORT allocate the work data sets according to sort rules.
  • Specify neither SORTNUM nor SORTDEVT, and specify SxxxWKnn DD statements in the JCL.
  • Specify only SORTDEVT, and let BMCSORT determine the number of data sets.

If you use SxxxWKnn (sort work) DD statements in the JCL, any SORTDEVT and SORTNUM specifications that are present are ignored. If you do not use SxxxWKnn DD statements and do not specify SORTDEVT or SORTNUM, the sort routine uses the installation options for SORTDEVT or SORTNUM.

Value

Description

SORTDEVT deviceType

SORTDEVT deviceType specifies the device type for the temporary sort work data sets that BMCSORT uses.

If you specify SORTDYN NO (SORTDYN), BMCSORT defaults are used even if you specify a value for SORTDEVT. Otherwise, BMC AMI Recover uses its internal default value, SYSDA, if you do not specify SORTDEVT.

SORTNUM integer

The SORTNUM option affects the allocation of sort work files when BMCSORT is allocating your sort work files dynamically. You can specify an integer value of 1 through 255.

When you specify this option, BMCSORT dynamically allocates the number of sort work files that it needs for each sort task up to the maximum that is illustrated in the following formula:

 maximum dynamically allocated sort work files = n - preallocated sort work files

If you specify integer from 1 through 32, n equals 32. If you specify integer greater than 32, n equals integer.

Important

Preallocated sort work files include sort work files that are allocated in your JCL.

If you do not specify a value for SORTNUM, BMC AMI Recover uses the installation option default.

NUMREC for RECOVER UNLOADKEYS

You must specify the same NUMREC values for all RECOVER UNLOADKEYS command statements for the same table space. NUMREC specifies the size of the sort file for the index sort routine. The size is defined as an estimate or the exact number of key records to process.

For information about performance implications, see Using.

Tip

BMC AMI Recover usually determines a good estimate for the number of key records automatically. BMC recommends that in most cases you do not specify NUMREC or that you specify NUMREC CALC (the default).

Value

Description

NUMREC CALC

(Default) Specifying this option allows BMC AMI Recover to estimate the number of key records to be sorted. BMC AMI Recover uses RUNSTATS statistics, if available, to make these estimates. If these statistics are not available, BMC AMI Recover tries to estimate the number of key records based on the number of pages in the associated table space.

BMC AMI Recover uses a minimum estimate of 400,000 for each index key sort (or 200,000 if the key length is greater than 1000 characters).

NUMREC NOEST

When you specify NUMREC NOEST, BMC AMI Recover passes an estimate of 400,000 to each index key sort (or 200,000 if the key length is greater than 1000 characters).

NUMREC EST integer

Use NUMREC EST integer to specify an estimated number of key records for the index sort routine. integer must be a positive integer.

If you have specified multiple indexes on the REBUILD or RECOVER UNLOADKEYS statement, BMC AMI Recover divides the NUMREC value equally among the indexes. In general, NUMREC EST is unnecessary and might degrade performance unless the specified value is accurate.

If the specified estimate is less than 400,000 (200,000 for keys with a length greater than 1000 characters), BMC AMI Recover uses an estimate of 400,000 (200,000 if the key length is greater than 1000 characters).

NUMREC ABS integer

Use NUMREC ABS integer to specify the exact number of key records for the index sort routine. integer must be a positive integer.

Warning

If integer is a value that does not represent the true number of key records passed to the index sort routine, the index sort routine will abend. Use extreme caution when you specify NUMREC ABS.

ANALYZE for RECOVER UNLOADKEYS

The ANALYZE option prints a recovery plan before executing that plan.

Information about the following items used for recovery is included in the plan:

  • The phases to occur during execution
  • The steps to occur within each phase

Use this information to allocate space more accurately for the unload work data sets so limiting abends that are caused by inadequate data set allocations. You can use these statistics with historical information about the times required to perform the various operations to estimate recovery time.

Important

If you coded ANALYZE with the OPTIONS command, you must code the same value here. If you use multiple BMC AMI Recover command statements, you must use the same value for the ANALYZE option in all of the statements. If you specify a value for ANALYZE on one command statement and take the default on the others, the value you specify on the single command statement becomes the default for the others.

Value

Description

 ANALYZE YES

(Default) 

BMC AMI Recover

 provides information about the items used for recovery that are in the recovery plan.

 ANALYZE NO

BMC AMI Recover

 provides no information.

 ANALYZE ONLY

If you specify ANALYZE ONLY, BMC AMI Recover provides the same information as it provides with ANALYZE YES and then stops the job when the ANALYZE phase is complete. You can use the data from the ANALYZE phase to determine the resources required and what will happen during the recovery job. You cannot restart a BMC AMI Recover job that specifies ANALYZE ONLY, but you can start a new recovery job.

Use the ANALYZE ONLY option to determine which phases will occur with a specific recovery request.


 

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