Initial status considerations for copy jobs
Initial status required to start or restart a copy
For image copies of catalog and directory spaces in DSNDB06 and DSNDB01,
requires that the following rules about 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,
receives an SQLCODE -904 message. For more information about catalog and directory spaces that need special handling during restart, see Restarting-catalog-and-directory-copy-jobs.
For image copies of other spaces or partitions,
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,
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,
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,
resets the status when making a full copy of the entire table space. However, if the copies are made by the data set,
does not reset the status automatically; you must reset the table space using the DB2 -START command.
- If
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,
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,
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,
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
.
The impact of using various SHRLEVEL options is as follows:
SHRLEVEL NONE | If you specify SHRLEVEL NONE, stops the space or partition during the UTILINIT phase. During the UTILTERM phase, 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, stops the space during the UTILINIT phase. If you specify SHRLEVEL REFERENCE with an initial space status other than UT, 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. For more detailed information, see Db2-commands-issued-by-BMC-AMI-Copy-for-read-and-write-databases. Also during the UTILTERM phase when you use SHRLEVEL REFERENCE, (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 uses the IBM Db2 COPY utility), the space is put in UTRO status. |
SHRLEVEL CHANGE | If you specify SHRLEVEL CHANGE, 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 detects that the status has changed during execution. Then, 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 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, 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), 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 detects that the status has changed during execution. Then, resets the status to the original status. |
Persistent Read Only status and COPY
will not copy table space partitions in Persistent Read Only (PRO) status.
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.