IBM Books

Administration Guide


Example - Setting up Two Single-Partition Instances for Mutual Takeover

The objective for this example is to set up two single-partition database instances with failover support in a mutual takeover configuration. In this example, four servers are configured into two MSCS clusters. By using the mutual takeover configuration, when any of the machine fails, the database server configured for that machine will fail over to the alternative machine, as configured using the MSCS software, and run on the alternative machine.

There are two MSCS clusters in the resulting configuration. Each cluster has:

In addition, each machine has one 100X Ethernet Adapter card installed.

Each machine has the following software installed:

The resulting network configuration is as follows:
Server 1:

  • Machine name:db2test1

  • TCP/IP hostname:db2test1

  • IP Address: 9.9.9.1

    (subnet mask: 255.255.255.0

  • MSCS cluster name: ClusterA
Server 2:

  • Machine name:db2test2

  • TCP/IP hostname:db2test2

  • IP Address: 9.9.9.2

    (subnet mask: 255.255.255.0

  • MSCS cluster name: ClusterA

Both machines in the network are configured with TCP/IP and connected to a private LAN using an Ethernet 100 T-base Hub. In the absence of a Domain Name Server (DNS), all machines have a local TCP/IP hosts file. Each hosts file contains the following entries:

   9.9.9.1	db2test1	# for Server 1
   9.9.9.2	db2test2	# for Server 2
   9.9.9.3	ClusterA	# for MSCS ClusterA
   9.9.9.4	db2tcp1	# for DB2 remote client connection to Server 1
   9.9.9.5	db2tcp2	# for DB2 remote client connection to Server 2
 

Preliminary Tasks

Before you perform the following tasks, it is assumed that both machines belong to the same domain, called DB2NTD:

  1. Create a domain account for DB2 that is a member of the local Administrators group on those machines where DB2 is going to run. Use the account for performing all tasks:

  2. Install the MSCS feature on the machines db2test1 and db2test2:

  3. Install DB2 Universal Database Enterprise Edition Version 5.2 on the machine db2test1. Install the software on C:\SQLLIB, which is a local drive.

  4. Install DB2 Universal Database Enterprise Edition Version 5.2 on the machine db2test2. Install the software on C:\SQLLIB, which is a local drive.

The next step is to set up the DB2MSCS.CFG file for each instance, then run the DB2MSCS utility for each instance.

Run the DB2MSCS Utility

To set up the db2test1 machine, perform the following tasks:

  1. On the machine db2test1, log on as user db2nt. The password is db2nt.

  2. Create the DB2 instance DB2A, if it does not already exist. The command to create the instance is:
       db2icrt DB2A
    

  3. Set up the DB2MSCS.CFG file for the DB2 instance on the machine db2test1:
       #
       #  DB2MSCS.CFG for database system
       #  on machine db2test1
       DB2_INSTANCE=DB2A
       CLUSTER_NAME=ClusterA
       #
       # Group 1
       GROUP_NAME=DB2A Group
       IP_NAME=IP Address for DB2A
       IP_ADDRESS=9.9.9.4
       IP_SUBNET=255.255.255.0
       IP_NETWORK=ClusterA
       NETNAME_NAME=Network name for DB2A
       NETNAME_VALUE=DB2SRV1
       NETNAME_DEPENDENCY=IP Address for DB2A
       DISK_NAME=Disk E:
       INSTPROF_DISK=Disk E:
    

  4. Run the DB2MSCS utility as follows:
       db2mscs -f:DB2MSCS.CFG
    

  5. Log out from the db2nt account.

  6. On the machine db2test2, log on as user db2nt, which belongs to the local Administrators group. The password is db2nt.

  7. Create the DB2 instance DB2B, if it does not already exist. The command to create the instance is:
       db2icrt DB2B
    

  8. Set up the DB2MSCS.CFG file for the DB2 instance on the machine db2test2:
       #
       #  DB2MSCS.CFG for database system
       #  on machine db2test2
       DB2_INSTANCE=DB2B
       CLUSTER_NAME=ClusterA
       #
       # Group 1
       GROUP_NAME=DB2B Group
       IP_NAME=IP Address for DB2B
       IP_ADDRESS=9.9.9.5
       IP_SUBNET=255.255.255.0
       IP_NETWORK=ClusterA
       NETNAME_NAME=Network name for DB2B
       NETNAME_VALUE=DB2SRV2
       NETNAME_DEPENDENCY=IP Address for DB2B
       DISK_NAME=Disk F:
       INSTPROF_DISK=Disk F:
    

  9. Run the DB2MSCS utility as follows:
       db2mscs -f:DB2MSCS.CFG
    

  10. Log out from the db2nt account.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]