db2iclus - Microsoft Cluster Server command

Allows users to add, drop, migrate and unmigrate instances and Db2® administration servers (DAS) in a Microsoft Cluster Server (MSCS) environment. This command is only available on Windows operating systems.

Authorization

Local administrator authority is required on the machine where the task will be performed. If adding a remote machine to an instance or removing a remote machine from an instance, local administrator authority is required on the target machine.

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagramdb2iclusADD /u:username,password/m:machine nameDROP/m:machine nameMIGRATE /p:InstProfPathUNMIGRATE/i:instance name/DAS:DAS name/c:cluster name

Command parameters

ADD
Adds an MSCS node to a Db2 MSCS instance.
DROP
Removes an MSCS node from a Db2 MSCS instance.
MIGRATE
Migrates a non-MSCS instance to an MSCS instance.
UNMIGRATE
Undoes the MSCS migration.
/DAS:DAS name
Specifies the DAS name. This option is required when performing the cluster operation against the Db2 administration server.
/c:cluster name
Specifies the MSCS cluster name if different from the default or current cluster.
/p:instance profile path
Specifies the instance profile path. This path must reside on a cluster disk so it is accessible when Db2 is active on any machine in the MSCS cluster. This option is required when migrating a non-MSCS instance to an MSCS instance.
/u:username,password
Specifies the account name and password for the Db2 service. This option is required when adding another MSCS node to the Db2 MSCS partitioned database instance.
/m:machine name
Specifies the remote computer name for adding or removing an MSCS node.
/i:instance name
Specifies the instance name if different from the default/current instance.

Examples

This example shows the use of the db2iclus command to manually configure the Db2 instance to run in a hot standby configuration that consists of two machines, WA26 and WA27.

  1. To start, MSCS and Db2 Enterprise Server Edition must be installed on both machines.
  2. Create a new instance called DB2 on machine WA26:
       db2icrt DB2
  3. From the Windows Services dialog box, ensure that the instance is configured to start manually.
  4. If the Db2 instance is running, stop it with the DB2STOP command.
  5. Install the Db2 resource type from WA26:
       c:>db2wolfi i
       ok
    If the db2wolfi command returns "Error : 183", then it is already installed. To confirm, the resource type can be dropped and added again. Also, the resource type will not show up in Cluster Administrator if it does not exist.
       c:>db2wolfi u
       ok
       c:>db2wolfi i
       ok
  6. From WA26, use the db2iclus command to transform the Db2 instance into a clustered instance.
       c:\>db2iclus migrate /i:db2 /c:mycluster /m:wa26 /p:p:\db2profs
    
       DBI1912I The Db2 Cluster command was successful.
       Explanation:  The user request was successfully processed.
       User Response:  No action required.
    The directory p:\db2profs should be on a clustered drive and must already exist. This drive should also be currently owned by machine WA26.
  7. From WA26, use the db2iclus command to add other machines to the Db2 cluster list:
       c:\>db2iclus add /i:db2 /c:mycluster /m:wa27
    
       DBI1912I The Db2 Cluster command was successful.
       Explanation:  The user request was successfully processed.
       User Response:  No action required.
    This command should be executed for each subsequent machine in the cluster.
  8. From Cluster Administrator, create a new group called "Db2 Group".
  9. From Cluster Administrator, move the Physical Disk resources Disk O and Disk P into Db2 Group.
  10. From Cluster Administrator, create a new resource type of type "IP Address" called "mscs5" that resides on the Public Network. This resource should also belong to Db2 Group. This will be a highly available IP address, and this address should not correspond to any machine on the network. Bring the IP Address resource type online and ensure that the address can be pinged from a remote machine.
  11. From Cluster Administrator, create a new resource of type "Db2" that will belong to Db2 Group. The name of this resource must be exactly identical to the instance name, so it is called Db2 for this case. When Cluster Administrator prompts for dependencies associated with the Db2 resource, ensure it is dependent on Disk O, Disk P and mscs5.
  12. Configure Db2 Group for fallback, if required, via Cluster Administrator and using the DB2_FALLBACK profile variable.
  13. Create or restore all databases putting all data on Disk O and Disk P.
  14. Test the failover configuration.

Usage notes

To migrate an instance to run in an MSCS failover environment, you need to migrate the instance on the current machine first, then add other MSCS nodes to the instance using the db2iclus with the ADD option.

To revert an MSCS instance back to a regular instance, you first need to remove all other MSCS nodes from the instance by using the db2iclus with the DROP option. Next, you should undo the migration for the instance on the current machine.