0% found this document useful (0 votes)
234 views

DB2 On Microsoft Cluster Service (MSCS) Step by Step

This document provides step-by-step instructions for setting up DB2 11.5.7 on a Windows 2019 failover cluster. It describes how to install DB2, create a DB2 resource in the cluster, set up a DB2 instance, configure communication and shared storage, create a database, and test failover functionality.

Uploaded by

legionario15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
234 views

DB2 On Microsoft Cluster Service (MSCS) Step by Step

This document provides step-by-step instructions for setting up DB2 11.5.7 on a Windows 2019 failover cluster. It describes how to install DB2, create a DB2 resource in the cluster, set up a DB2 instance, configure communication and shared storage, create a database, and test failover functionality.

Uploaded by

legionario15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Step by Step Setup

DB2 11.5.7 on
Microsoft Windows 2019
Failover Cluster (MSCS)
Windows 2019 Evaluation
Virtual Box 6.1.30
DB2 11.5.7 Community Edition
Part1: Setup Windows Failover Cluster
Machine Name OS IP Role
WIN19DC Windows 2019 192.168.1.109 (Bridged) Domain Controller + File Server
WIN19C1 Windows 2019 192.168.1.101 (Bridged) Node 1/ Server 1
WIN19C2 Windows 2019 192.168.1.102 (Bridged) Node 2/ Server 2

Cluster is created in another Video

Title: Windows 2019 Failover Cluster Step By Step


Link: https://youtu.be/4_RD5VGzBoU

Part2: Install DB2


Install DB2 as you normally do in Windows environment.

Run db2setup

Choose Domain Account for DB2 Services.

Verify DB2 Version using db2level

Verify DB2 license using db2licm –l

Verify DB2 Default Instance using db2ilist


Part3: Create a DB2 Resource/Role in the
Cluster
Add a DB2 resource

db2wolfi i

Add a role in the Cluster of Type DB2 Server by using


Failover Cluster Manager (cluadmin.msc)

Create a folder in the Shared File System

mkdir H:\INST_SHARED

Add a File Share to the DB2 Resource/Role


Part4: Create a DB2 Instance
Run db2icrt on any node – WIN19C1 (I am choosing node 1)

db2icrt -s ese -u DB\DB2ADMIN DB2INST1

Verify Instance is created on WIN19C1

db2ilist

Verify DB2 Instance Services on WIN19C1

Services.msc

Migrate the Instance to Cluster on same node where instance is


created - WIN19C1
db2iclus MIGRATE /i:DB2INST1 /c:WIN19C1 /p:\\DB2INST1\INST_SHARED
/u:DB\DB2ADMIN

Verify Instance is now part of Cluster on WIN19C1

db2ilist

Add the Second Node to instance - WIN19C2


db2iclus ADD /i:DB2INST1 /c:WIN19C2 /p:\\DB2INST1\INST_SHARED
/u:DB\DB2ADMIN

Verify DB2 Instance Services on WIN19C2

Services.msc

Verify DB2 Registry key using regedit on WIN19C2

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service
s\DB2INST1-0
Part5: Rename the DB2 Resource in Cluster

Open Failover Cluster Manager

Right Click on Role

Rename the DB2 Server to DB2INST1-0 (InstanceName-0)

Add dependencies
1. Storage
2. IP Address
3. File Server

Bring the Resource online

Failover the Resource (Reboot may required)

Part7: Setup the DB2 Communication


db2set DB2COMM=TCPIP

db2 UPDATE DBM CFG USING SVCENAME 50001

Start and Stop Instance using Failover Cluster Manager

Part8: Create the Database


db2 UPDATE DBM CFG USING DFDBPATH to H:

db2 CREATE DB TEST

db2 ACTIVATE DB TEST

Verify Database is created on the Shared File System


Part 9: Test the VIP (Virtual IP)
Launch DB2 Command Window on Local Machine

db2 CATALOG TCPIP NODE WINHA REMOTE 192.168.1.111 SERVER 50001

db2 CATALOG DATABASE TEST AT NODE WINHA

db2 TERMINATE

db2 LIST NODE DIRECTORY

db2 connect to TEST user db2admin using password

db2 "SELECT SUBSTR( HOST_NAME,1,15) as HOST,


SUBSTR(OS_NAME,1,10) as OS , SUBSTR(OS_VERSION,1,10)
OS_VERSION FROM SYSIBMADM.ENV_SYS_INFO"

https://docs.microsoft.com/en-us/windows/win32/sysinfo/operating-system-version

On the Windows Server, verify the connection

Db2 LIST APPLICATIONS

Now perform Failover

And in putty verify the new Node Name

db2 connect to TEST user db2admin using password

db2 "SELECT SUBSTR( HOST_NAME,1,15) as HOST,


SUBSTR(OS_NAME,1,10) as OS , SUBSTR(OS_VERSION,1,10)
OS_VERSION FROM SYSIBMADM.ENV_SYS_INFO"
On the Windows Server, verify the connection

Db2 LIST APPLICATIONS

You might also like