RECLONE_REPLICATED_OBJECTS procedure
The RECLONE_REPLICATED_OBJECTS procedure forces all replicated objects to be recloned in a Db2® Mirror environment. The procedure is run on the source node of a Db2 Mirror pair when replication is suspended. All replicated objects that exist on the source node are added to the Object Tracking List (OTL) to be saved and then restored on the copy node when replication is resumed. The resynchronization process replaces the replicated objects on the copy node if they already exist.
- Journaling is ended for all non-replicated objects that are journaled to a replicated journal that will be deleted on the copy node. Query the QSYS2.EVALUATE_RECLONE_JOURNALED_OBJECTS table function before calling the RECLONE_REPLICATED_OBJECTS procedure to generate a list of the non-replicated affected objects.
- Non-replicated database objects are deleted on the copy node if they are dependent on replicated *FILE, *SQLUDT, or *SQLXSR objects that will be deleted in preparation for the restore. Query the QSYS2.EVALUATE_RECLONE_RELATED_OBJECTS table function before calling the RECLONE_REPLICATED_OBJECTS procedure to generate a list of the affected objects.
- Replicated objects that exist only on the copy node are deleted. This can occur when changes have been made to the Replication Criteria List (RCL) on the source node when the replication state is TRACKING and the change identifies new objects for replication that exist only on the copy node. This can also occur when a replicated object on the source node is deleted while the replication state is TRACKING. Query the QSYS2.EVALUATE_RECLONE_REPLICATION_CRITERIA table function before calling the RECLONE_REPLICATED_OBJECTS procedure to generate a list of the affected objects.
A deferred record will be written to the OTL for each non-replicated object that is deleted on the copy node and for every non-replicated table, view, index, library, data area, data queue, and IFS object that has journaling ended.
The RECLONE_REPLICATED_OBJECTS procedure starts a job to carry out the work of the software reclone. The job name is QMRDBESYNC for *SYSBAS or QMRDBESxxx for an IASP where xxx is the IASP number. The procedure populates a result table with a row that contains the job information submitted to process the request. Monitor the QMRDBESYNC (or QMRDBESxxx) job for progress and errors.
This procedure causes the source node to go into a persistent suspended state, indicated as a REPLICATION_DETAIL_INFO value of -216 in the QSYS2.MIRROR_INFO view. All changes continue to be tracked on the source node while the procedure is running. The user cannot resume replication while the node is in this state. The persistent suspend state is ended and replication is resumed upon successful completion of this procedure.
- This procedure is called on the primary node. The replication state must be TRACKING or BLOCKED. The replication detail must be SUSPENDED.
- The copy node for the software reclone must be available.
- The NRGs must be started.
- Security objects must be synchronized before calling this procedure. All *USRPRF and *AUTL objects are compared and must be equivalent on both nodes. Function usage information (WRKFCNUSG command) and security attributes (DSPSECA command) are also compared and must be equivalent on both nodes. The procedure attempts to resolve any security object differences, but if differences remain the reclone procedure fails.
- The replication state for SYSBAS must be ACTIVE.
- The replication state of the IASP on the node where this procedure is run must be TRACKING. The replication detail must be SUSPENDED.
- The IASP must be a database IASP and must be available on both nodes.
Authorization: The privileges held by the authorization ID of the statement must include *ALLOBJ special authority. For the authority needed to use this procedure, see Authorization.
The schema is QSYS2.
- iasp-name
A character or graphic string that contains the device description name of the independent auxiliary storage pool (IASP) that contains the objects that will be recloned. For an IASP group, specify the device description name of the source IASP.
Can contain the following special value:- *SYSBAS
- SYSBAS includes the system ASP (ASP 1) and the basic user ASPs (ASPs 2-32).
resume-type
A character or graphic string that specifies the type of resume requested. Recloning all
replicated objects requires multiple operations, including resuming replication. This parameter
controls the type of resume to perform for this internally initiated operation. - ABNORMAL
- The process to resume replication and proceed with recloning all replicated objects is allowed to proceed without completing all checks that determine replication can be resumed safely. Replication will be allowed to resume and all replicated objects will be recloned even if a node has jobs with Db2 Mirror database connections that have not fully processed a previous suspend request.
- NORMAL
- The process to resume replication proceeds normally. All checks are performed to determine whether replication can be resumed safely on both nodes before any replicated objects are recloned. This is the default.
Note: An IBM® service representative must be contacted before attempting to reclone replicated objects with a resume-type of ABNORMAL. Resuming replication before all jobs have processed a previous suspend request could potentially cause replicated objects to become out-of-sync.
A result set is returned from the procedure that contains the name of job that was submitted.
Example
- Perform a software reclone for
IASP33.
CALL QSYS2.RECLONE_REPLICATED_OBJECTS(IASP_NAME => 'IASP33');
