There are several scenarios where you might need details to re-build TSAMP. If TSAMP did not start properly after an upgrade or even while troubleshooting, the option to open a case with IBM and get root cause analyzed takes time. In many of these scenarios, it’s just better to rebuild TSAMP from scratch. As a standard practice, our team keeps these details handy, if there is a situation in which we need to re-build TSAMP.

You will need the following details to setup TSAMP:

  • Server Long Name
  • Server Short Name
  • Server Identifier for HADR
  • Network Interfaces for Public Network
  • Virtual IP (VIP)
  • TSAMP Domain
  • Quorum Device

Server Long Name

You can get this using the hostname -a command

Server Short Name

You can get this using the hostname command, or you can also look for this information in /etc/hosts

Server Identifier for HADR

Make sure that the primary and standby node names are mapped to their corresponding public IP addresses in the /etc/hosts file:

192.XX.2.XX linux01

192.XX.2.XX linux02

Network Interfaces for Public Network:

The bond0 (or whatever is applicable in your case) network interfaces are connected to each other through the external network cloud forming the public network.

bond0     Link encap:Ethernet  HWaddr E0:DB:55:1F:9A:0E
          inet addr:10.100.XX.XX Bcast:10.XXX.XX.XXX  Mask:255.XXX.255.0
          inet6 addr: fe80::e2db:55ff:fe1f:9a0e/64 Scope:Link
          RX packets:2328296868053 errors:1 dropped:16 overruns:0 frame:6826
          TX packets:1798754444501 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:576587636036994 (524.4 TiB)  TX bytes:1473974292907023 (1.3 PiB)

Note the server IP associated with the network interface

Virtual IP (VIP)

$ db2pd -ha
           DB2 HA Status
Instance Information:
Instance Name                  = db2inst1
Number Of Domains              = 1
Number Of RGs for instance     = 2

Domain Information:
Domain Name                    = xtvprod
Cluster Version                =
Cluster State                  = Online
Number of nodes                = 2

Node Information:
Node Name                     State
---------------------         -------------------
pr1db02  					Online
pr1db01  					Online

Resource Group Information:
Resource Group Name            = db2_db2inst1_db2inst1_DB2XTVDB-rg
Resource Group LockState       = Unlocked
Resource Group OpState         = Online
Resource Group Nominal OpState = Online
Number of Group Resources      = 2
Number of Allowed Nodes        = 2
   Allowed Nodes
Member Resource Information:
   Resource Name                  = db2ip_192_0_XX_XX-rs
   Resource State                 = Online
   Resource Type                  = IP

   Resource Name                  = db2_db2inst1_db2inst1_DB2XTVDB-rs
   Resource State                 = Online
   Resource Type                  = HADR
   HADR Primary Instance          = db2inst1
   HADR Secondary Instance        = db2inst1
   HADR DB Name                   = XTVDB
   HADR Primary Node              = pr1db01
   HADR Secondary Node            = pr1db02

Resource Group Name            = linux01     _0-rg
Resource Group LockState       = Unlocked
Resource Group OpState         = Online
Resource Group Nominal OpState = Online
Number of Group Resources      = 1
Number of Allowed Nodes        = 1
   Allowed Nodes
Member Resource Information:
   Resource Name                  = linux01_0-rs
   Resource State                 = Online
   Resource Type                  = DB2 Member
   DB2 Member Number              = 0
   Number of Allowed Nodes        = 1
      Allowed Nodes

Network Information:
Network Name                  Number of Adapters
-----------------------       ------------------
db2_public_network_0          2

   Node Name                     Adapter Name
   -----------------------       ------------------			     bond0			     bond0

Quorum Information:
Quorum Name                                  Quorum State
------------------------------------         --------------------
db2_Quorum_Network_192_0_XXX_X:6_X_48       Online

TSAMP Domain

You can find the TSAMP Domain name using the following command. The Domain name is in the below example:

[[email protected] ~]$ lsrpdomain
Name     OpState RSCTActiveVersion MixedVersions TSPort GSPort
xtvprod Online           Yes           12347  12348

Quorum Device

To find the Quorum Device, use the following command. Quorum Device is in the below example (192.0 .XX.123)

[[email protected] ~]$ lsrsrc -c -Ab IBM.PeerNode
Resource Class Persistent and Dynamic Attributes for IBM.PeerNode
resource 1:
        CommittedRSCTVersion       = ""
        ActiveVersionChanging      = 0
        OpQuorumOverride           = 0
        CritRsrcProtMethod         = 1
        OpQuorumTieBreaker         =
        QuorumType                 = 0
        QuorumGroupName            = ""
        Fanout                     = 32
        OpFenceGroup               = ""
        NodeCleanupCommand         = ""
        NodeCleanupCriteria        = ""
        QuorumLessStartupTimeout   = 120
        CriticalMode               = 1
        NotifyQuorumChangedCommand = ""
        NamePolicy                 = 0

Other ways of saving TSAMP information:

To capture: [email protected] # sampolicy –s hadr_policy_YYYYMMDD.xml

To apply: [email protected] # sampolicy –a hadr_policy_YYYYMMDD.xml

Note that using this method may not catch the configuration that needs to be done within Db2.

In 11.1 and higher, you can also use the -o option on the db2haicu command to export the current TSAMP configuration to an XML output file.

Useful tech notes to read:

Share This