Initial status considerations for copy jobs
For
BMC AMI Copy
to start (or restart) a copy of a space or partition, the initial status of the space or partition must meet certain requirements.
These requirements depend on whether you are copying catalog or directory spaces in databases DSNDB01 or DSNDB06. Also, BMC AMI Copy might change the space or partition status in ways that depend on the particular options specified for the copy. Each partition in a table space might have a different initial status.
Initial status required to start or restart a copy
For image copies of catalog and directory spaces in DSNDB06 and DSNDB01, BMC AMI Copy requires that the following rules regarding initial status to start or restart a copy are followed for catalog and directory spaces:
- All catalog and directory spaces, except SYSCOPY, SYSLGRNX, and SYSUTILX, can be in either RO, RW, or UTRW status.
- SYSCOPY, SYSLGRNX, and SYSUTILX must initially be in RW status.
- SYSCOPY can not be in COPY-pending status when copying other catalog and directory spaces. However, all other catalog and directory spaces, except SYSLGRNX, can be in COPY-pending status.
- UT status is not acceptable for any catalog or directory space.
If any catalog and directory spaces in DSNDB06 and DSNDB01 have an initial status of UT, BMC AMI Copy receives a SQLCODE -904 message. Restarting-catalog-and-directory-copy-jobs provides more information about catalog and directory spaces that need special handling during restart.
For image copies of other spaces or partitions, BMC AMI Copy requires that the target space or partition have an initial start status of RW, RO, UT, or UTRW. The target space can also be in COPY-pending status. For SHRLEVEL CHANGE or SHRLEVEL NONE copies, the space can also be in REORP status. The space or partition must not be in any other status. In particular, the space or partition must not be in CHECK-pending status (CHKP) or RECOVER-pending (RECP) status. Also, the database containing the space or partition must also have an initial start status of RW, RO, or UT.
For index copies, the index space must be in RW, RO, UT, or UTRW status. The table space containing the table on which the index is defined must also be in RW, RO, UT, or UTRW status if a QUIESCE is needed. If the table space is in COPY-pending status and a SHRLEVEL REFERENCE or CONCURRENT copy is being made, it must be copied in the same group as the index, or the index copy will not be allowed.
You should be aware of the following status information:
If the initial status is UTRW, it indicates that a Db2 utility is currently executing against the space or partition and allowing read-write access to that space.
- When the initial status of the space or partition is COPY-pending and you request full copies, BMC AMI Copy examines the historical information in the SYSIBM.SYSCOPY table. If you request full copies for only one site and the historical information shows that full copies are normally made for both local and recovery sites, BMC AMI Copy issues a warning message (BMC47319). Be aware that if you request copies for only one site, the other site is limited to a point-in-time recovery in the event a recovery is necessary.
- When a multi-data-set, nonpartitioned table space is initially in COPY-pending status, BMC AMI Copy resets the status when making a full copy of the entire table space. However, if the copies are made by data set, BMC AMI Copy does not reset the status automatically; you must reset the table space using the DB2 -START command.
- If BMC AMI Copy fails during the COPY phase when making a full image copy of a table space using RESETMOD YES and you restart the utility using the NEW, TERM, NEW/RESET, or TERM/RESET restart parameter, BMC AMI Copy puts a T in the ICTYPE column of the SYSIBM.SYSCOPY table. This prevents you from making an incremental copy before making a full copy.
Initial status and the SHRLEVEL option
When you use the SHRLEVEL option, BMC AMI Copy might change the status of the space or partition during the UTILINIT phase. This depends on the SHRLEVEL value, the initial status, and whether you are making full copies of table or index spaces or incremental copies of table spaces.
Also, depending on the values of SHRLEVEL, RESETMOD, and the initial status, BMC AMI Copy might also change space or partition status during the UTILTERM phase. The tables in Db2-commands-issued-by-BMC-AMI-Copy-for-read-and-write-databases summarize the various scenarios and the Db2 commands issued by BMC AMI Copy.
The impact of using various SHRLEVEL options is as follows:
SHRLEVEL NONE | If you specify SHRLEVEL NONE, BMC AMI Copy stops the space or partition during the UTILINIT phase. During the UTILTERM phase, BMC AMI Copy restarts the space with the same status it had when the copy process began, except that the COPY-pending status indicator is reset when appropriate. |
SHRLEVEL REFERENCE | If you specify SHRLEVEL REFERENCE with an initial space status of UT, BMC AMI Copy stops the space during the UTILINIT phase. If you specify SHRLEVEL REFERENCE with an initial space status other than UT, BMC AMI Copy starts the space in RO status (when necessary) during the UTILINIT phase and then quiesces the space. During the UTILTERM phase, if you specify RESETMOD YES with SHRLEVEL REFERENCE, the table space or partition might be stopped depending on whether there are changed pages. See Db2-commands-issued-by-BMC-AMI-Copy-for-read-and-write-databases for more detailed information. Also during the UTILTERM phase when you use SHRLEVEL REFERENCE, BMC AMI Copy (if it is the last utility) restarts the space with the same status it had when the copy process began, except that the COPY-pending status indicator is reset when appropriate. If you specify SHRLEVEL REFERENCE when copying the Db2 catalog and directory spaces DSNDB06.SYSCOPY, DSNDB01.SYSUTILX, DSNDB01.DBD01, or DSDNB01.SYSDBDXA (that is, when BMC AMI Copy uses the IBM Db2 COPY utility), the space is put in UTRO status. |
SHRLEVEL CHANGE | If you specify SHRLEVEL CHANGE, BMC AMI Copy does not stop the space or partition or change its status. The quiesce is not required although you can optionally request one using the QUIESCE BEFORE syntax. No status changes are made to these spaces during the UTILTERM phase unless BMC AMI Copy detects that the status has changed during execution. Then, BMC AMI Copy will reset the status to the original status. If you specify SHRLEVEL CHANGE when copying the Db2 catalog and directory spaces DSNDB06.SYSCOPY, DSNDB01.SYSUTILX, DSNDB01.DBD01, or DSDNB01.SYSDBDXA (that is, when BMC AMI Copy uses the IBM Db2 COPY utility), the space is put in UTRW status. |
SHRLEVEL CONCURRENT | If you specify SHRLEVEL CONCURRENT and the installation option READONLY is set to RO, BMC AMI Copy changes the status of the spaces or partitions to RO at the beginning of the UTILINIT phase. At the end of the UTILINIT phase (after the spaces have been registered with Snapshot), BMC AMI Copy changes their status to RW if no other BMC utilities are using the space. No status changes are made to these spaces during the UTILTERM phase unless BMC AMI Copy detects that the status has changed during execution. Then, BMC AMI Copy resets the status to the original status. |
Persistent Read Only status and COPY
BMC AMI Copy will not copy table space partitions in Persistent Read Only (PRO) status.
BMC AMI Copy copies table spaces in PRO status in the following ways:
- COPY TS .... DSNUM ALL with one or more partitions in PRO status issues message BMC180184E and fails with return code 8.
- COPY TS .... DSNUM n with partition n in PRO status issues message BMC180185E and fails with return code 8.
- COPY TS .... DSNUM PART/DATASET with partition n in PRO status copies partitions that are not in PRO status and issues message BMC180185E for partition n and fails with return code 8.