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 platforms.
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.
Command syntax
>>-db2iclus----------------------------------------------------->
>--+-ADD /u:--username,password--+-------------------+-+-------->
| '-/m:--machine name-' |
+-DROP--+-------------------+-----------------------+
| '-/m:--machine name-' |
+-MIGRATE /p:--InstProfPath-------------------------+
'-UNMIGRATE-----------------------------------------'
>--+--------------------+--+-----------------+------------------>
'-/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/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.
- To start, MSCS and DB2 Enterprise Server Edition must
be installed on both machines.
- Create a new instance called DB2 on
machine WA26:
db2icrt DB2
- From the Windows Services dialog box,
ensure that the instance is configured to start manually.
- If the DB2 instance is running,
stop it with the DB2STOP command.
- 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
- 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.
- 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.
- From Cluster Administrator, create a new group called "DB2 Group".
- From Cluster Administrator, move the Physical Disk resources Disk
O and Disk P into DB2 Group.
- 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.
- 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.
- Configure DB2 Group
for fallback, if desired, via Cluster Administrator and using the
DB2_FALLBACK profile variable.
- Create or restore all databases putting all data on Disk O and
Disk P.
- 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.