SETUP_MIRROR procedure

The SETUP_MIRROR procedure sets the primary and secondary node names and host names for the Db2® Mirror environment. It must be run on the node that will be the primary node.

To set the primary and secondary node names, the SYSBAS replication state must be NOT MIRRORED. To set the primary and secondary host names, the SYSBAS replication state must be NOT MIRRORED, ACTIVE, or TRACKING.

Authorization: For the authority needed to use this procedure, see Authorization.

Read syntax diagramSkip visual syntax diagram SETUP_MIRROR ( PRIMARY_NODE => primary-node,SECONDARY_NODE => secondary-node,PRIMARY_HOSTNAME => primary-hostname,SECONDARY_HOSTNAME => secondary-hostname )

The schema is QSYS2.

primary-node
A character or graphic string that contains the name of the partition designated as the primary node. The primary node is allowed to make changes to replicated objects when replication is not possible.
If primary-node is not specified or is the null value, the definition of the primary node will remain unchanged.
secondary-node
A character or graphic string that contains the name of the partition designated as the secondary node. The secondary node cannot make changes to replicated objects when replication is not possible.
If secondary-node is not specified or is the null value, the definition of the secondary node will remain unchanged.
primary-hostname
A character or graphic string that contains the host and domain name or the IP address of the partition designated as the primary node.
If primary-hostname is not specified or is the null value, the definition of the primary host name will remain unchanged.
secondary-hostname
A character or graphic string that contains the host and domain name or the IP address of the partition designated as the secondary node.
If secondary-hostname is not specified or is the null value, the definition of the secondary host name will remain unchanged.

Examples

  • Define the primary and secondary nodes and their host names.
    CALL QSYS2.SETUP_MIRROR(PRIMARY_NODE => 'DB2M_PRI',
                            SECONDARY_NODE => 'DB2M_SEC',  
                            PRIMARY_HOSTNAME => 'primary.example.com', 
                            SECONDARY_HOSTNAME => 'secondary.example.com');
  • Correct the host name of the secondary node.
    CALL QSYS2.SETUP_MIRROR(SECONDARY_HOSTNAME => 'new.example.com');