Setting up Db2 Mirror using commands
Db2® Mirror can be configured without using the GUI. Perform these steps to set up and clone using SQL procedures and Qshell commands.
SQL procedures are used as well as the Qshell command db2mtool. The commands provided by Db2 Mirror are referred to as the Db2 Mirror tools. See db2mtool command reference for more details on the db2mtool command and Db2 Mirror services for more information on the SQL procedures.
- Define node names and host names for Db2 Mirror on the setup source node.
- Use SQL procedure: QSYS2.SETUP_MIRROR
- Configure network redundancy groups (NRGs) on the setup source node.
- Network planning considerations: Network
- Use SQL procedures: QSYS2.ADD_NRG_LINK, QSYS2.REMOVE_NRG_LINK, QSYS2.CHANGE_NRG_LINK, QSYS2.CHANGE_NRG
- Set the default inclusion state for SYSBAS objects on the setup source node.
- Object replication planning considerations: Object replication considerations
- Use SQL procedure: QSYS2.SET_DEFAULT_INCLUSION_STATE
- Add independent auxiliary storage pools (IASPs) to Db2 Mirror on the setup source node.
- IASP planning considerations: Independent auxiliary storage pools
- Use SQL procedure: QSYS2.ADD_MIRROR_IASP
- Configure the replication criteria list (RCL) on the setup source node.
- Object replication planning considerations: Object replication considerations
- Use SQL procedures: QSYS2.ADD_REPLICATION_CRITERIA, QSYS2.REMOVE_REPLICATION_CRITERIA, QSYS2.PROCESS_PENDING_REPLICATION_CRITERIA
ADD_REPLICATION_CRITERIA procedure
- Configure the cluster on the setup source node.
- Clustering planning considerations: Clustering
- Use SQL procedure: QSYS2.SET_MIRROR_CLUSTER
- Configure the Network Time Protocol (NTP) client on the setup source node.
- Time synchronization using NTP planning considerations: Time synchronization using NTP
- Use SQL procedure: QSYS2.ADD_TIME_SERVER
- Store setup copy node configuration settings in the meta_data.json
configuration file.
- JSON files used by the db2mtool command
- meta_data JSON file
- Use Qshell commands:
- db2mtool action=new
- db2mtool action=update
- db2mtool action=save
- Store storage and cloning attributes in the clone_info.json configuration file.
- JSON files used by the db2mtool command
- clone_info JSON file
- Use Qshell commands:
- db2mtool action=new
- db2mtool action=update
- db2mtool action=save
- Install hardware management console (HMC) security certificates on the managing node.
- Use Qshell command: db2mtool action=installCertificate
- Run precheck.
- Use Qshell command: db2mtool action=precheck
- Clone SYSBAS.
- Use Qshell command: db2mtool action=start
- Verify SYSBAS clone is complete.
- Use Qshell command: db2mtool action=checksysbas
- Clone database IASPs.
- Use Qshell command: db2mtool action=iaspcopy