Move and rename actions

When moving or renaming a replicated object, the object will be moved or renamed on both nodes.

There are Db2® Mirror rules for some move and rename library scenarios, some of which are mentioned below. If any of these failure scenarios are encountered, the move or rename will fail with an error. The message will include the specific failure reason.

Rename Object (RNMOBJ)

When renaming an object that is not a library using the Rename Object command or the Rename Object (QLIRNMO) API and the current object is replicated, the object is renamed on both the source and target nodes.

If only the new object is replicated (the current object is not replicated), the object is renamed on the source node and then the object is replicated to the target node.

When renaming a replicated library, the library is renamed on the target node and then the library is renamed on the source node. The replication rules for the current library and the new library must be the same. If the current library is replicated and there are no replication rules for the new library, the current library's replication rules will be added to the RCL for the new library.

Move Object (MOVOBJ)

When moving a replicated object, the object is moved on the source node and then the object is moved on the target node.

  • If the object is replicated in both FROMLIB and TOLIB, the object is moved on the source node and then the object is moved on the target node.
  • If only the current object in FROMLIB is replicated (the new object is not replicated), the object is moved on the source node and then the object is moved on the target node.
  • If only the new object in TOLIB is replicated (the current object is not replicated), the object is moved on the source node and then the new object is replicated to the target node.

If any of the move operations fail, the move will fail on both nodes and MOVOBJ will return the failure detail.

MOVOBJ can be used to move database files from a non-replicated library to a replicated library. The dependency network for the file being moved should be reviewed to ensure dependent files are also moved to a replicated library. If MOVOBJ causes part of the dependency network to be included in replication, you are responsible for managing changes for the excluded objects between the nodes.

Move Library to ASP (QHSMMOVL) API

The Move Library to ASP (QHSMMOVL) API can be used to move a replicated library and its contents from its existing auxiliary storage pool (ASP) to the specified target ASP. With Db2 Mirror only moves from SYSBAS to an IASP and from an IASP to SYSBAS are supported.

After the library is moved to the target ASP on the source node, the move library operation is replicated on the target node. If there are no RCL rules for the library in the target ASP, the existing RCL rules for the library will be duplicated in the RCL for the new library in the target ASP.