Creates the infrastructure for DB2® failover support on Windows
using Microsoft Cluster Server (MSCS). This utility
can be used to enable failover in both single-partition and partitioned
database environments.
Authorization
The user must be logged on
to a domain user account that belongs to the Administrators
group of each machine in the MSCS cluster.
Command syntax
>>-db2mscs--+--------------------+--+----------------+---------->
+- -f--input_file----+ '- -l--user_name-'
'- -u--instance_name-'
>--+---------------+-------------------------------------------><
'- -p--password-'
Command parameters
- -f input_file
- Specifies the input file to be used by the MSCS
utility. If this parameter is specified, db2mscs utility
will use filename as the input file. If this parameter is not specified,
the db2mscs utility will try to use the DB2MSCS.CFG file
that is in the current directory.
- -u instance_name
- This option allows you to undo the db2mscs operation
and revert the instance back to the non-MSCS instance specified by instance_name.
- -l user_name
- Specifies the user name of the domain account for the DB2 service. If you specify this
parameter and the DB2_LOGON_USERNAME parameter
in the DB2MSCS.CFG file is already specified,
the value for the DB2_LOGON_USERNAME parameter
is ignored. If neither of the parameters are specified, the DB2 service is created under the
local administrator account on the remote machine.
If you are concerned
about security, use the -l parameter. Do not
specify the DB2_LOGON_USERNAME parameter.
- -p password
- Specifies the password of the domain account for the DB2 service. If you specify this parameter and
the DB2_LOGON_PASSWORD parameter in the DB2MSCS.CFG file
is already specified, the value for the DB2_LOGON_PASSWORD parameter
is ignored. If neither of the parameters are specified, you will be
prompted for a password.
If you are concerned about security, use
the -p parameter. Do not specify the DB2_LOGON_PASSWORD parameter.
Usage notes
The
db2mscs utility
is a standalone command line utility used to transform a non-MSCS
instance into an MSCS instance. The utility will create all MSCS
groups, resources, and resource dependencies. It will also copy all DB2 information stored in the Windows registry to the cluster portion of
the registry as well as moving the instance directory to a shared
cluster disk. The
db2mscs utility takes as input
a configuration file provided by the user specifying how the cluster
should be set up. The
DB2MSCS.CFG file is an ASCII
text file that contains parameters that are read by the
db2mscs utility.
You specify each input parameter on a separate line using the following
format:
PARAMETER_KEYWORD=parameter_value. For example:
CLUSTER_NAME=FINANCE
GROUP_NAME=DB2 Group
IP_ADDRESS=9.21.22.89
Two example configuration files
can be found in the
CFG subdirectory under the DB2 install directory. The first,
DB2MSCS.EE,
is an example for single-partition database environments. The second,
DB2MSCS.EEE,
is an example for partitioned database environments.
Ensure
the Control Center is not active before issuing the db2mscs command.
If the Control Center is active, the db2mscs utility
will exit in error.
The parameters for the
DB2MSCS.CFG file
are as follows:
- DB2_INSTANCE
- The name of the DB2 instance.
This parameter has a global scope and should be specified only once
in the DB2MSCS.CFG file. It is required that DB2_INSTANCE
must be stopped before running db2mscs.
- DAS_INSTANCE
- The name of the DB2 Admin
Server instance. Specify this parameter to migrate the DB2 Admin Server to run in the MSCS environment.
This parameter has a global scope and should be specified only once
in the DB2MSCS.CFG file.
- CLUSTER_NAME
- The name of the MSCS cluster. All the resources specified
following this line are created in this cluster until another CLUSTER_NAME
parameter is specified.
- DB2_LOGON_USERNAME
- The
user name of the domain account for the DB2 service
(specified as domain\user). This parameter has
a global scope and should be specified only once in the DB2MSCS.CFG file.
If this parameter is not specified, the DB2 service
will be created under the local administrator account on the remote
machine.
- DB2_LOGON_PASSWORD
- The
password of the domain account for the DB2 service.
This parameter has a global scope and should be specified only once
in the DB2MSCS.CFG file. If DB2_LOGON_USERNAME is
specified and DB2_LOGON_PASSWORD is not specified,
you will be prompted for a password.
- GROUP_NAME
- The name of the MSCS group. If this parameter
is specified, a new MSCS group is created if it does not exist.
If the group already exists, it is used as the target group. Any
MSCS resource specified after this parameter is created in this group
or moved into this group until another GROUP_NAME parameter is specified.
Specify this parameter once for each group. A MSCS group can be
created within a MSCS Cluster.
- DB2_NODE
- The
database partition number of the database partition server (or database partition) to be included in
the current MSCS group. If multiple logical database partitions exist on the same machine, each
database partition requires a separate DB2_NODE parameter. Specify this parameter after the
GROUP_NAME parameter so that the DB2 resources are created in
the correct MSCS group.
- IP_NAME
- The name of the IP Address resource. The value for the IP_NAME
is arbitrary, but it must be unique in the cluster. When this parameter
is specified, an MSCS resource of type IP Address is created. This
parameter is required for remote TCP/IP connections. This parameter
is optional in a single partition database environment. A recommended
name is the hostname that corresponds to the IP address.
- IP_ADDRESS
- The TCP/IP address for the IP resource specified by the
preceding IP_NAME parameter. This parameter is required if the
IP_NAME parameter is specified. This is a new IP address that is
not used by any machine in the network.
- IP_SUBNET
- The TCP/IP subnet mask for the IP resource specified by the
preceding IP_NAME parameter. This parameter is required if the
IP_NAME parameter is specified.
- IP_NETWORK
- The name of the MSCS network to which the preceding IP Address
resource belongs. This parameter is optional. If it is not specified,
the first MSCS network detected by the system is used. The name
of the MSCS network must be entered exactly as seen under the Networks
branch in Cluster Administrator. The previous four IP keywords are
used to create an IP Address resource.
- NETNAME_NAME
- The
name of the Network Name resource. Specify this parameter to create the Network Name resource. You
must specify this parameter for the instance owning machine, on which DB2 instance directory resides.
- NETNAME_VALUE
- The value for the Network Name resource. This parameter must
be specified if the NETNAME_NAME parameter is specified.
- NETNAME_DEPENDENCY
- The name for the IP resource that the Network Name resource
depends on. Each Network Name resource must have a dependency on
an IP Address resource. This parameter is optional. If it is not
specified, the Network Name resource has a dependency on the first
IP resource in the group.
- SERVICE_DISPLAY_NAME
- The display name of the Generic Service resource. Specify
this parameter if you want to create a Generic Service resource.
- SERVICE_NAME
- The service name of the Generic Service resource. This parameter
must be specified if the SERVICE_DISPLAY_NAME parameter is specified.
- SERVICE_STARTUP
- Optional startup parameter for the Generic Resource service.
- DISK_NAME
- The name of the physical disk resource to be moved to the
current group. Specify as many disk resources as you need. The
disk resources must already exist. When the db2mscs utility
configures the DB2 instance
for failover support, the instance directory is copied to the first
MSCS disk in the group. To specify a different MSCS disk for the
instance directory, use the INSTPROF_DISK parameter. The disk name
used should be entered exactly as seen in Cluster Administrator.
- INSTPROF_DISK
- An optional parameter to specify an MSCS disk to contain the DB2 instance directory. If this
parameter is not specified the db2mscs utility
uses the first disk that belongs to the same group.
- INSTPROF_PATH
- An optional parameter to specify the exact path where the
instance directory will be copied. This parameter must be
specified when using IPSHAdisks, a ServerRAID Netfinity disk resource (for example, INSTPROF_PATH=p:\db2profs).
INSTPROF_PATH will take precedence over INSTPROF_DISK if both are
specified.
- TARGET_DRVMAP_DISK
- An optional parameter to specify the target MSCS disk for database
drive mapping for a the multi-partitioned database environment. This
parameter will specify the disk the database will be created on by
mapping it from the drive the create database command specifies. If
this parameter is not specified, the database drive mapping must
be manually registered using the db2drvmp utility.
- DB2_FALLBACK
- An optional parameter to control whether or not the applications
should be forced off when the DB2 resource
is brought offline. If not specified, then the setting for DB2_FALLBACK
will be YES. If you do not want the applications to be forced off,
then set DB2_FALLBACK to NO.