Removing TSA Automation from HADR - fsmegale/Db2-luw GitHub Wiki

You may need to remove the TSA Automation from your Db2 HADR configuration.

This is a Test Case showing how to do that.

Commands Summary

  1. on Primary:
db2haicu -delete
  1. on Standby
db2haicu -delete
  1. from both hosts:
lssam

lsrpdomain

Details:

  1. Checking HADR configurarion:

1.1) on Primary

db2inst1@suse15-machine1:~> db2 get db cfg for hadrloc |grep -i hadr
       Database Configuration for Database hadrloc
 HADR database role                                      = PRIMARY
 HADR local host name                  (HADR_LOCAL_HOST) = 192.168.42.129
 HADR local service name                (HADR_LOCAL_SVC) = 30002
 HADR remote host name                (HADR_REMOTE_HOST) = 192.168.42.129
 HADR remote service name              (HADR_REMOTE_SVC) = 30001
 HADR instance name of remote server  (HADR_REMOTE_INST) = db2dmc
 HADR timeout value                       (HADR_TIMEOUT) = 3
 HADR target list                     (HADR_TARGET_LIST) =
 HADR log write synchronization mode     (HADR_SYNCMODE) = NEARSYNC
 HADR spool log data limit (4KB)      (HADR_SPOOL_LIMIT) = AUTOMATIC(25600)
 HADR log replay delay (seconds)     (HADR_REPLAY_DELAY) = 0
 HADR peer window duration (seconds)  (HADR_PEER_WINDOW) = 120
 HADR SSL certificate label             (HADR_SSL_LABEL) =
 HADR SSL Hostname Validation        (HADR_SSL_HOST_VAL) = OFF

1.2) on Standby:

db2dmc@suse15-machine1:~>  db2 get db cfg for hadrloc |grep -i hadr
       Database Configuration for Database hadrloc
 HADR database role                                      = STANDBY
 HADR local host name                  (HADR_LOCAL_HOST) = 192.168.42.129
 HADR local service name                (HADR_LOCAL_SVC) = 30001
 HADR remote host name                (HADR_REMOTE_HOST) = 192.168.42.129
 HADR remote service name              (HADR_REMOTE_SVC) = 30002
 HADR instance name of remote server  (HADR_REMOTE_INST) = db2inst1
 HADR timeout value                       (HADR_TIMEOUT) = 3
 HADR target list                     (HADR_TARGET_LIST) =
 HADR log write synchronization mode     (HADR_SYNCMODE) = NEARSYNC
 HADR spool log data limit (4KB)      (HADR_SPOOL_LIMIT) = AUTOMATIC(25600)
 HADR log replay delay (seconds)     (HADR_REPLAY_DELAY) = 0
 HADR peer window duration (seconds)  (HADR_PEER_WINDOW) = 120
 HADR SSL certificate label             (HADR_SSL_LABEL) =
 HADR SSL Hostname Validation        (HADR_SSL_HOST_VAL) = OFF

1.2) from any host:

suse15-machine1:~ # lssam
Online IBM.ResourceGroup:db2_db2dmc_suse15-machine1_0-rg Nominal=Online
        '- Online IBM.Application:db2_db2dmc_suse15-machine1_0-rs
                '- Online IBM.Application:db2_db2dmc_suse15-machine1_0-rs:suse15-machine1
Online IBM.ResourceGroup:db2_db2inst1_suse15-machine1_0-rg Nominal=Online
        '- Online IBM.Application:db2_db2inst1_suse15-machine1_0-rs
                '- Online IBM.Application:db2_db2inst1_suse15-machine1_0-rs:suse15-machine1
Online IBM.Equivalency:db2_db2dmc_suse15-machine1_0-rg_group-equ
        '- Online IBM.PeerNode:suse15-machine1:suse15-machine1
Online IBM.Equivalency:db2_db2inst1_suse15-machine1_0-rg_group-equ
        '- Online IBM.PeerNode:suse15-machine1:suse15-machine1
Online IBM.Equivalency:db2_public_network_0
        '- Online IBM.NetworkInterface:eth1:suse15-machine1
  1. Removing the TSA Automation:

2.1) on Primary

  • removing with "db2haicu -delete":
db2inst1@suse15-machine1:~> db2haicu -delete
Welcome to the DB2 High Availability Instance Configuration Utility (db2haicu).

You can find detailed diagnostic information in the DB2 server diagnostic log file called db2diag.log. Also, you can use the utility called db2pd to query the status of the cluster domains you create.

For more information about configuring your clustered environment using db2haicu, see the topic called 'DB2 High Availability Instance Configuration Utility (db2haicu)' in the DB2 Information Center.

db2haicu determined the current DB2 database manager instance is 'db2inst1'. The cluster configuration that follows will apply to this instance.

When you use db2haicu to configure your clustered environment, you create cluster domains. For more information, see the topic 'Creating a cluster domain with db2haicu' in the DB2 Information Center. db2haicu is searching the current machine for an existing active cluster domain ...
db2haicu found a cluster domain called 'HADRLOC_domain' on this machine. The cluster configuration that follows will apply to this domain.

Removing DB2 database partition '0' from the cluster ...
Removing DB2 database partition '0' from the cluster was successful.
All cluster configurations have been completed successfully. db2haicu exiting ...
  • checking results with "lssam":
db2inst1@suse15-machine1:~> lssam
Online IBM.ResourceGroup:db2_db2dmc_suse15-machine1_0-rg Nominal=Online
        '- Online IBM.Application:db2_db2dmc_suse15-machine1_0-rs
                '- Online IBM.Application:db2_db2dmc_suse15-machine1_0-rs:suse15-machine1
Online IBM.Equivalency:db2_db2dmc_suse15-machine1_0-rg_group-equ
        '- Online IBM.PeerNode:suse15-machine1:suse15-machine1
Online IBM.Equivalency:db2_public_network_0
        '- Online IBM.NetworkInterface:eth1:suse15-machine1
  1. on standby
  • removing with "db2haicu -delete":
db2dmc@suse15-machine1:~> db2haicu -delete
Welcome to the DB2 High Availability Instance Configuration Utility (db2haicu).

You can find detailed diagnostic information in the DB2 server diagnostic log file called db2diag.log. Also, you can use the utility called db2pd to query the status of the cluster domains you create.

For more information about configuring your clustered environment using db2haicu, see the topic called 'DB2 High Availability Instance Configuration Utility (db2haicu)' in the DB2 Information Center.

db2haicu determined the current DB2 database manager instance is 'db2dmc'. The cluster configuration that follows will apply to this instance.

When you use db2haicu to configure your clustered environment, you create cluster domains. For more information, see the topic 'Creating a cluster domain with db2haicu' in the DB2 Information Center. db2haicu is searching the current machine for an existing active cluster domain ...
db2haicu found a cluster domain called 'HADRLOC_domain' on this machine. The cluster configuration that follows will apply to this domain.

Removing DB2 database partition '0' from the cluster ...
Removing DB2 database partition '0' from the cluster was successful.
Deleting the domain 'HADRLOC_domain' from the cluster ...
Deleting the domain 'HADRLOC_domain' from the cluster was successful.
All cluster configurations have been completed successfully. db2haicu exiting ...
  • checking results from both hosts:
db2dmc@suse15-machine1:~> lssam
lssam: No online domain found.


db2inst1@suse15-machine1:~> lssam
lssam: No online domain found.


db2inst1@suse15-machine1:~> lsrpnode
lsrpnode: There are no nodes in the peer domain or an online peer domain does not exist.


db2inst1@suse15-machine1:~> lsrpdomain
db2inst1@suse15-machine1:~>

TSA Automation removed with Success