This article describes how to create an efficient DB2 cluster service using MSC, including the overall idea and examples for your reference.
Working overtime on weekends, I learned that I was helping people build a Windows failover cluster. Although the main focus is on middleware, Windows has been studying for a year after all. Besides, I have worked on the MSC cluster in WebSphere and WebLogic, so I thought it was just a piece of cake, in the end, I couldn't think of it from AM to AM.
First, we adopt Oracle in Windows: both hosts enable database instances, and databases are stored in shared storage. By adding a common DB2 service to cluster resources, so as to achieve the Failover of database services.
It should be said that there is no problem in thinking, but there is a problem in implementation, that is, when a user connects, stopping the db2 service will fail, and the second stop will be able to stop, in this way, it will be a problem to manually transfer the cluster. So we thought about how to execute the command to interrupt all database links before the database service is stopped ...... Meditation, multiple attempts, and so on.
At last, I went to IBM developerworks to find a document to find out that there was no need to worry about this. I only needed one copy of the instance, and DB2 had prepared the db2msce tool for you. I only needed to write a copy of db2msc. cfg configuration file:
DB2_INSTANCE = DB2 // specify the name of the instance to be converted
DB2_LOGON_USERNAME = dbdomain/db2admin // specify the domain user account used to log on to the instance
DB2_LOGON_PASSWORD = 0000 // specify the password of the user account used to log on to the instance domain
CLUSTER_NAME = MYCLUSTER // specify the cluster name
GROUP_NAME = DB2 Group A // specify the Group name used for this instance
DB2NODE = 0 // specify the DB2 node number corresponding to the group of resources
IP_NAME = MscsA // specify the name of the IP address resource used for this instance
IP_ADDRESS = 192.168.192.31 // IP address attribute of the specified IP address resource