Applying mod FixPack to Db2 LUW TSA managed HADR - fsmegale/Db2-luw GitHub Wiki
This is a test case to upgrade from Db2 v11.5.5.1 to v11.5.8.0 on TSA-managed HADR environment.
If any doubt, you can check the Reference in the end of this document.
Both hosts are:
Suse 15 SP3
Db2 v11.5.5.1
instance name: db2tsa1
database: tsadb
Hostnames:
primary: suse15-machine1
standby: suse15-machine2
- lssam output (with VIP configuration):
db2tsa1@suse15-machine1:/etc> lssam
Online IBM.ResourceGroup:db2_db2tsa1_db2tsa1_TSADB-rg Nominal=Online
|- Online IBM.Application:db2_db2tsa1_db2tsa1_TSADB-rs
|- Online IBM.Application:db2_db2tsa1_db2tsa1_TSADB-rs:suse15-machine1
'- Offline IBM.Application:db2_db2tsa1_db2tsa1_TSADB-rs:suse15-machine2
'- Online IBM.ServiceIP:db2ip_192_168_42_131-rs
|- Online IBM.ServiceIP:db2ip_192_168_42_131-rs:suse15-machine1
'- Offline IBM.ServiceIP:db2ip_192_168_42_131-rs:suse15-machine2
Online IBM.ResourceGroup:db2_db2tsa1_suse15-machine1_0-rg Nominal=Online
'- Online IBM.Application:db2_db2tsa1_suse15-machine1_0-rs
'- Online IBM.Application:db2_db2tsa1_suse15-machine1_0-rs:suse15-machine1
Online IBM.ResourceGroup:db2_db2tsa1_suse15-machine2_0-rg Nominal=Online
'- Online IBM.Application:db2_db2tsa1_suse15-machine2_0-rs
'- Online IBM.Application:db2_db2tsa1_suse15-machine2_0-rs:suse15-machine2
Online IBM.Equivalency:db2_db2tsa1_db2tsa1_TSADB-rg_group-equ
|- Online IBM.PeerNode:suse15-machine1:suse15-machine1
'- Online IBM.PeerNode:suse15-machine2:suse15-machine2
Online IBM.Equivalency:db2_db2tsa1_suse15-machine1_0-rg_group-equ
'- Online IBM.PeerNode:suse15-machine1:suse15-machine1
Online IBM.Equivalency:db2_db2tsa1_suse15-machine2_0-rg_group-equ
'- Online IBM.PeerNode:suse15-machine2:suse15-machine2
Online IBM.Equivalency:db2_public_network_0
|- Online IBM.NetworkInterface:eth0:suse15-machine1
'- Online IBM.NetworkInterface:eth0:suse15-machine2
- db2pd -hadr output (PEER and CONNECTED states):
db2tsa1@suse15-machine2:~> db2pd -d tsadb -hadr
Database Member 0 -- Database TSADB -- Standby -- Up 0 days 00:52:13 -- Date 2023-05-08-11.51.09.784290
HADR_ROLE = STANDBY
REPLAY_TYPE = PHYSICAL
HADR_SYNCMODE = NEARSYNC
STANDBY_ID = 0
LOG_STREAM_ID = 0
HADR_STATE = PEER
HADR_FLAGS = TCP_PROTOCOL
PRIMARY_MEMBER_HOST = 192.168.42.129
PRIMARY_INSTANCE = db2tsa1
PRIMARY_MEMBER = 0
STANDBY_MEMBER_HOST = 192.168.42.130
STANDBY_INSTANCE = db2tsa1
STANDBY_MEMBER = 0
HADR_CONNECT_STATUS = CONNECTED
HADR_CONNECT_STATUS_TIME = 05/08/2023 10:59:03.870947 (1683554343)
HEARTBEAT_INTERVAL(seconds) = 1
HEARTBEAT_MISSED = 0
HEARTBEAT_EXPECTED = 3126
HADR_TIMEOUT(seconds) = 3
TIME_SINCE_LAST_RECV(seconds) = 0
PEER_WAIT_LIMIT(seconds) = 0
LOG_HADR_WAIT_CUR(seconds) = 0.000
LOG_HADR_WAIT_RECENT_AVG(seconds) = 0.000000
LOG_HADR_WAIT_ACCUMULATED(seconds) = 0.000
LOG_HADR_WAIT_COUNT = 0
SOCK_SEND_BUF_REQUESTED,ACTUAL(bytes) = 0, 87040
SOCK_RECV_BUF_REQUESTED,ACTUAL(bytes) = 0, 131072
PRIMARY_LOG_FILE,PAGE,POS = S0000007.LOG, 0, 74052769
STANDBY_LOG_FILE,PAGE,POS = S0000007.LOG, 0, 74052769
HADR_LOG_GAP(bytes) = 0
STANDBY_REPLAY_LOG_FILE,PAGE,POS = S0000007.LOG, 0, 74052769
STANDBY_RECV_REPLAY_GAP(bytes) = 0
PRIMARY_LOG_TIME = 05/08/2023 10:26:53.000000 (1683552413)
STANDBY_LOG_TIME = 05/08/2023 10:26:53.000000 (1683552413)
STANDBY_REPLAY_LOG_TIME = 05/08/2023 10:26:53.000000 (1683552413)
STANDBY_RECV_BUF_SIZE(pages) = 4298
STANDBY_RECV_BUF_PERCENT = 0
STANDBY_SPOOL_LIMIT(pages) = 25600
STANDBY_SPOOL_PERCENT = 0
STANDBY_ERROR_TIME = NULL
PEER_WINDOW(seconds) = 120
PEER_WINDOW_END = 05/08/2023 11:53:09.000000 (1683557589)
READS_ON_STANDBY_ENABLED = N
HADR_LAST_TAKEOVER_TIME = NULL
- lssrc (AVN and IVN are matching)
db2tsa1@suse15-machine1:/new/tmp> lssrc -ls IBM.RecoveryRM |grep VN
Our IVN : 4.1.0.7
Our AVN : 4.1.0.7
Our CVN : 00000021b22c8519 (00000021)
- lsrpdomain (no MixedVerions)
suse15-machine2:~ # lsrpdomain
Name OpState RSCTActiveVersion MixedVersions TSPort GSPort
tsa-hadr-domain Online 3.2.6.2 No 12347 12348
Check states:
- lssam (check if everything is ok)
- db2pd -d tsadb -hadr (check if it's PEER and CONNECTED)
- lssrc -ls IBM.RecoveryRM |grep VN (check if AVN and IVN are matching)
- lsrpdomain (check if there are no MixedVerions)
- db2prereqcheck -v 11.5.8.0 //check if it has no errors for NON PureScale installation
-- on the Stand By host:
db2 deactivate db <db_name>
db2stop
stoprpnode -f <standby_node> //as root
-install fixpack
./db2prereqcheck -v 11.5.8.0 //check if it has no errors again
./db2_install -b <path_to_install_binaries> -p SERVER
./db2iupdt <instance_name>
db2level //check if it shows v11.5.8.0
-- on the Primary host:
startrpnode <standby node> //as root
-- on the Stand By host:
db2start
db2 activate db <db_name>
db2pd -d <db_name> -hadr //check if its PEER and CONNECTED
db2 takeover hadr on db tsadb
db2pd -d tsadb -hadr //check if its DISCONNECTED
-- on the OLD PRIMARY
db2 deactivate db <db_name>
db2stop
stoprpnode -f <old_primary_host> //as root
./db2prereqcheck -s -v 11.5.8.0
./db2_install -b <path_to_install_binaries> -p SERVER
./db2iupdt <instance_name>
db2level //check if it shows v11.5.8.0
-- on OLD STAND BY
startrpnode <old_primary>
-- on OLD PRIMARY
db2start
db2 activate db <db_name>
db2pd -d tsadb -hadr //check if it's PEER and CONNECTED
db2 takeover hadr on db <db_name>
Now, the host has their original holes (primary and stand by)
-- on the Primary
db2 connect to <db_name>
db2 terminate
db2updv115 -d <db_name>
lssrc -ls IBM.RecoveryRM |grep VN //check if IVN and AVN matches
lsrpdomain //check if there are no mixed versions
//if you get "Mixed Versions" and/or IVN/AVN doesn't match from the command above, do this:
"
export CT_MANAGEMENT_SCOPE=2
runact -c IBM.PeerDomain CompleteMigration Options=0
samctrl -m // Type 'Y' to confirm migration
"
after that:
lssam //check if everything is ok
bind files:
db2 connect to <db_name>
db2 "BIND <path>/sqllib/bnd/db2schema.bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE"
db2 "BIND <path>/sqllib/bnd/@db2ubind.lst BLOCKING ALL GRANT PUBLIC ACTION ADD"
db2 "BIND <path>/sqllib/bnd/@db2cli.lst BLOCKING ALL GRANT PUBLIC ACTION ADD"
db2 "BIND <path>/sqllib/bnd/@ddcsmvs.lst BLOCKING ALL SQLERROR CONTINUE GRANT PUBLIC ACTION ADD"
db2 "bind <path>/sqllib/bnd/@applycs.lst isolation cs blocking all grant public"
db2 "bind <path>/sqllib/bnd/@applyur.lst isolation ur blocking all grant public"
db2 "bind <path>/sqllib/bnd/db2dsproc.bnd blocking all grant public"
db2 "bind <path>/sqllib/bnd/db2stats.bnd blocking all grant public"
Following the steps from the documentation:
"
1 - On the standby node, stop all Db2 processes:
deactivate db . This command stops HADR, but retains the role.
db2stop force.
"
db2tsa1@suse15-machine2:/new/Db2> db2 deactivate db tsadb
DB20000I The DEACTIVATE DATABASE command completed successfully.
db2tsa1@suse15-machine2:/new/Db2> db2stop
05/08/2023 12:28:38 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
"
2 Run the stoprpnode -f command as root.
"
suse15-machine2:~ # id
uid=0(root) gid=0(root) groups=0(root)
suse15-machine2:~ # stoprpnode -f suse15-machine2
suse15-machine2:~ #
"
3 - Apply Fix Pack
"
- Prerequcheck:
suse15-machine2:/new/tmp/v11.5.8.0/universal # ./db2prereqcheck -s -v 11.5.8.0
DBT3533I The db2prereqcheck utility has confirmed that all installation prerequisites were met.
Requirement not matched for DB2 database "Server" with pureScale feature . Version: "11.5.8.0".
Summary of prerequisites that are not met on the current system: DBT3507E The db2prereqcheck utility failed to find the following package or file: "kernel-default-devel".
DBT3507E The db2prereqcheck utility failed to find the following package or file: "libelf-devel".
DBT3507E The db2prereqcheck utility failed to find the following package or file: "patch".
DBT3507E The db2prereqcheck utility failed to find the following package or file: "kernel-source".
DBT3507E The db2prereqcheck utility failed to find the following package or file: "gcc-c++".
DBT3507E The db2prereqcheck utility failed to find the following package or file: "gcc".
Just PureScale features aren't match. This is a Stand Alone environment so that's ok.
- installing FixPack at /new/Db2/v11.5.8.0/
suse15-machine2:/new/tmp/v11.5.8.0/universal # ./db2_install -b /new/Db2/v11.5.8.0/ -p SERVER
Read the license agreement file in the db2/license directory.
***********************************************************
To accept those terms, enter "yes". Otherwise, enter "no" to cancel the install process. [yes/no]
yes
***********************************************************
Do you want to install the DB2 pureScale Feature? [yes/no]
no
DB2 installation is being initialized.
(...)
Task #59 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #59 end
The execution completed with warnings.
For more information see the DB2 installation log at
"/tmp/db2_install.log.7690".
The log shows:
"
WARNING: DBI20105E An error occurred while installing the following file set:
"PCMK". Because these files were not successfully installed, functionality that
depends on these files might not work as expected.
(...)
WARNING: DBI20187W The Pacemaker watchdog cannot be setup because the watchdog configuration file "/dev/watchdog" already exist.
Enabling the Pacemaker watchdog :.......Failure
DBI1514I The DB2 High Availability (HA) scripts for the IBM Tivoli
System Automation for Multiplatforms (SA MP) were successfully
installed.
"
Those are Pacemaker related.
This environment is configured with TSA instead. So, that's ok.
Additionally:
"
Installing or updating Db2 resource agent scripts for Pacemaker :.......Success
Executing control tasks :.......Success
Updating global registry :.......Success
Starting DB2 Fault Monitor :.......Success
Updating the db2ls and db2greg link :.......Success
Registering DB2 licenses :.......Success
Setting default global profile registry variables :.......Success
Initializing instance list :.......Success
Updating global profile registry :.......Success
"
suse15-machine2:/new/Db2/v11.5.8.0/instance # ./db2iupdt db2tsa1
DBI1446I The db2iupdt command is running.
(...)
db2tsa1@suse15-machine2:~> db2level
DB21085I This instance or install (instance name, where applicable: "db2tsa1")
uses "64" bits and DB2 code release "SQL11058" with level identifier
"0609010F".
Informational tokens are "DB2 v11.5.8.0", "s2209201700", "DYN2209201700AMD64",
and Fix Pack "0".
Product is installed at "/new/Db2/v11.5.8.0".
"
4 - On the primary node, run the startrpnode command as root.
"
suse15-machine1:~ # id
uid=0(root) gid=0(root) groups=0(root)
suse15-machine1:~ # startrpnode suse15-machine2
"
5 - On the standby node, start all Db2 processes: db2start. activate db . This command resumes HADR but retains the role. Verify that the HADR pair has established PEER state via the db2pd -hadr db command.
"
db2tsa1@suse15-machine2:~> db2start
05/08/2023 14:13:20 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
db2tsa1@suse15-machine2:~> db2 activate db tsadb
DB20000I The ACTIVATE DATABASE command completed successfully.
db2tsa1@suse15-machine2:~> db2pd -d tsadb -hadr
Database Member 0 -- Database TSADB -- Standby -- Up 0 days 00:00:37 -- Date 2023-05-08-14.14.14.216686
HADR_ROLE = STANDBY
REPLAY_TYPE = PHYSICAL
HADR_SYNCMODE = NEARSYNC
STANDBY_ID = 0
LOG_STREAM_ID = 0
HADR_STATE = PEER
HADR_FLAGS = TCP_PROTOCOL
PRIMARY_MEMBER_HOST = 192.168.42.129
PRIMARY_INSTANCE = db2tsa1
PRIMARY_MEMBER = 0
STANDBY_MEMBER_HOST = 192.168.42.130
STANDBY_INSTANCE = db2tsa1
STANDBY_MEMBER = 0
HADR_CONNECT_STATUS = CONNECTED
HADR_CONNECT_STATUS_TIME = 05/08/2023 14:13:37.775452 (1683566017)
HEARTBEAT_INTERVAL(seconds) = 1
HEARTBEAT_MISSED = 0
HEARTBEAT_EXPECTED = 36
HADR_TIMEOUT(seconds) = 3
TIME_SINCE_LAST_RECV(seconds) = 0
PEER_WAIT_LIMIT(seconds) = 0
LOG_HADR_WAIT_CUR(seconds) = 0.000
LOG_HADR_WAIT_RECENT_AVG(seconds) = 0.001806
LOG_HADR_WAIT_ACCUMULATED(seconds) = 0.004
LOG_HADR_WAIT_COUNT = 2
SOCK_SEND_BUF_REQUESTED,ACTUAL(bytes) = 0, 87040
SOCK_RECV_BUF_REQUESTED,ACTUAL(bytes) = 0, 131072
PRIMARY_LOG_FILE,PAGE,POS = S0000008.LOG, 45, 78410292
STANDBY_LOG_FILE,PAGE,POS = S0000008.LOG, 45, 78410292
HADR_LOG_GAP(bytes) = 0
STANDBY_REPLAY_LOG_FILE,PAGE,POS = S0000008.LOG, 45, 78410292
STANDBY_RECV_REPLAY_GAP(bytes) = 0
PRIMARY_LOG_TIME = 05/08/2023 13:03:47.000000 (1683561827)
STANDBY_LOG_TIME = 05/08/2023 13:03:47.000000 (1683561827)
STANDBY_REPLAY_LOG_TIME = 05/08/2023 13:03:47.000000 (1683561827)
STANDBY_RECV_BUF_SIZE(pages) = 4298
STANDBY_RECV_BUF_PERCENT = 0
STANDBY_SPOOL_LIMIT(pages) = 25600
STANDBY_SPOOL_PERCENT = 0
STANDBY_ERROR_TIME = NULL
PEER_WINDOW(seconds) = 120
PEER_WINDOW_END = 05/08/2023 14:16:14.000000 (1683566174)
READS_ON_STANDBY_ENABLED = N
HADR_LAST_TAKEOVER_TIME = NULL
"
6 - Perform a role-switch:
On the standby node, issue the db2 takeover hadr on db command. Old primary disconnects because new primary is on a higher fix pack level.
"
db2tsa1@suse15-machine2:~> db2 takeover hadr on db tsadb
DB20000I The TAKEOVER HADR ON DATABASE command completed successfully.
db2tsa1@suse15-machine2:~> db2pd -d tsadb -hadr
Database Member 0 -- Database TSADB -- Active -- Up 0 days 00:02:20 -- Date 2023-05-08-14.15.57.893131
HADR_ROLE = PRIMARY
REPLAY_TYPE = PHYSICAL
HADR_SYNCMODE = NEARSYNC
STANDBY_ID = 1
LOG_STREAM_ID = 0
HADR_STATE = DISCONNECTED
HADR_FLAGS =
PRIMARY_MEMBER_HOST = 192.168.42.130
PRIMARY_INSTANCE = db2tsa1
PRIMARY_MEMBER = 0
STANDBY_MEMBER_HOST = 192.168.42.129
STANDBY_INSTANCE = db2tsa1
STANDBY_MEMBER = 0
HADR_CONNECT_STATUS = DISCONNECTED
HADR_CONNECT_STATUS_TIME = 05/08/2023 14:15:38.827439 (1683566138)
HEARTBEAT_INTERVAL(seconds) = 1
HEARTBEAT_MISSED = 0
HEARTBEAT_EXPECTED = 118
HADR_TIMEOUT(seconds) = 3
TIME_SINCE_LAST_RECV(seconds) = 0
PEER_WAIT_LIMIT(seconds) = 0
LOG_HADR_WAIT_CUR(seconds) = 0.000
LOG_HADR_WAIT_RECENT_AVG(seconds) = 0.000000
LOG_HADR_WAIT_ACCUMULATED(seconds) = 0.000
LOG_HADR_WAIT_COUNT = 0
SOCK_SEND_BUF_REQUESTED,ACTUAL(bytes) = 0, 16384
SOCK_RECV_BUF_REQUESTED,ACTUAL(bytes) = 0, 131072
PRIMARY_LOG_FILE,PAGE,POS = S0000008.LOG, 45, 78410292
STANDBY_LOG_FILE,PAGE,POS = S0000000.LOG, 0, 0
HADR_LOG_GAP(bytes) = 0
STANDBY_REPLAY_LOG_FILE,PAGE,POS = S0000000.LOG, 0, 0
STANDBY_RECV_REPLAY_GAP(bytes) = 0
PRIMARY_LOG_TIME = 05/08/2023 13:03:47.000000 (1683561827)
STANDBY_LOG_TIME = NULL
STANDBY_REPLAY_LOG_TIME = NULL
PEER_WINDOW(seconds) = 120
HADR_LAST_TAKEOVER_TIME = 05/08/2023 14:15:35.000000 (1683566135)
"
7 - On the old primary node, repeat steps 1-5 to apply the fix pack.
"
db2tsa1@suse15-machine1:~> db2 list active databases
SQL1611W No data was returned by Database System Monitor.
anyway..
db2tsa1@suse15-machine1:~> db2 deactivate db tsadb
DB20000I The DEACTIVATE DATABASE command completed successfully.
db2tsa1@suse15-machine1:~> db2stop
05/08/2023 14:23:13 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
suse15-machine1:~ # id
uid=0(root) gid=0(root) groups=0(root)
suse15-machine1:~ # stoprpnode -f suse15-machine1
suse15-machine1:~ #
suse15-machine1:/new/tmp/v11.5.8.0/universal # ./db2prereqcheck -s -v 11.5.8.0
DBT3533I The db2prereqcheck utility has confirmed that all installation prerequisites were met.
Requirement not matched for DB2 database "Server" with pureScale feature . Version: "11.5.8.0".
Summary of prerequisites that are not met on the current system: DBT3507E The db2prereqcheck utility failed to find the following package or file: "kernel-default-devel".
DBT3507E The db2prereqcheck utility failed to find the following package or file: "libelf-devel".
DBT3507E The db2prereqcheck utility failed to find the following package or file: "patch".
DBT3507E The db2prereqcheck utility failed to find the following package or file: "kernel-source".
DBT3507E The db2prereqcheck utility failed to find the following package or file: "gcc-c++".
DBT3507E The db2prereqcheck utility failed to find the following package or file: "gcc".
suse15-machine1:/new/tmp/v11.5.8.0/universal # ./db2_install -b /new/Db2/v11.5.8.0/ -p SERVER
Read the license agreement file in the db2/license directory.
***********************************************************
To accept those terms, enter "yes". Otherwise, enter "no" to cancel the install process. [yes/no]
yes
***********************************************************
Do you want to install the DB2 pureScale Feature? [yes/no]
no
DB2 installation is being initialized.
(...)
suse15-machine1:/new/Db2/v11.5.8.0/instance # ./db2iupdt db2tsa1
DBI1446I The db2iupdt command is running.
DB2 installation is being initialized.
Total number of tasks to be performed: 4
Total estimated time for all tasks to be performed: 309 second(s)
Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end
Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end
Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end
Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end
The execution completed successfully.
For more information see the DB2 installation log at "/tmp/db2iupdt.log.28330".
DBI1070I Program db2iupdt completed successfully.
suse15-machine1:/new/Db2/v11.5.8.0/instance # su - db2tsa1
db2tsa1@suse15-machine1:~> db2level
DB21085I This instance or install (instance name, where applicable: "db2tsa1")
uses "64" bits and DB2 code release "SQL11058" with level identifier
"0609010F".
Informational tokens are "DB2 v11.5.8.0", "s2209201700", "DYN2209201700AMD64",
and Fix Pack "0".
Product is installed at "/new/Db2/v11.5.8.0".
suse15-machine2:/new/Db2/v11.5.8.0/instance # startrpnode suse15-machine1
suse15-machine2:/new/Db2/v11.5.8.0/instance #
db2tsa1@suse15-machine1:~> db2start
05/08/2023 14:40:59 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
db2tsa1@suse15-machine1:~> db2 activate db tsadb
DB20000I The ACTIVATE DATABASE command completed successfully.
db2tsa1@suse15-machine1:~> db2pd -d tsadb -hadr
Database Member 0 -- Database TSADB -- Standby -- Up 0 days 00:00:31 -- Date 2023-05-08-15.04.30.071900
HADR_ROLE = STANDBY
REPLAY_TYPE = PHYSICAL
HADR_SYNCMODE = NEARSYNC
STANDBY_ID = 0
LOG_STREAM_ID = 0
HADR_STATE = PEER
HADR_FLAGS = TCP_PROTOCOL
PRIMARY_MEMBER_HOST = 192.168.42.130
PRIMARY_INSTANCE = db2tsa1
PRIMARY_MEMBER = 0
STANDBY_MEMBER_HOST = 192.168.42.129
STANDBY_INSTANCE = db2tsa1
STANDBY_MEMBER = 0
HADR_CONNECT_STATUS = CONNECTED
HADR_CONNECT_STATUS_TIME = 05/08/2023 15:03:59.900893 (1683569039)
HEARTBEAT_INTERVAL(seconds) = 1
HEARTBEAT_MISSED = 0
HEARTBEAT_EXPECTED = 30
HADR_TIMEOUT(seconds) = 3
TIME_SINCE_LAST_RECV(seconds) = 1
PEER_WAIT_LIMIT(seconds) = 0
LOG_HADR_WAIT_CUR(seconds) = 0.000
LOG_HADR_WAIT_RECENT_AVG(seconds) = 0.000000
LOG_HADR_WAIT_ACCUMULATED(seconds) = 0.000
LOG_HADR_WAIT_COUNT = 0
SOCK_SEND_BUF_REQUESTED,ACTUAL(bytes) = 0, 87040
SOCK_RECV_BUF_REQUESTED,ACTUAL(bytes) = 0, 131072
PRIMARY_LOG_FILE,PAGE,POS = S0000008.LOG, 45, 78410292
STANDBY_LOG_FILE,PAGE,POS = S0000008.LOG, 45, 78410292
HADR_LOG_GAP(bytes) = 0
STANDBY_REPLAY_LOG_FILE,PAGE,POS = S0000008.LOG, 45, 78410292
STANDBY_RECV_REPLAY_GAP(bytes) = 0
PRIMARY_LOG_TIME = 05/08/2023 13:03:47.000000 (1683561827)
STANDBY_LOG_TIME = 05/08/2023 13:03:47.000000 (1683561827)
STANDBY_REPLAY_LOG_TIME = 05/08/2023 13:03:47.000000 (1683561827)
STANDBY_RECV_BUF_SIZE(pages) = 4298
STANDBY_RECV_BUF_PERCENT = 0
STANDBY_SPOOL_LIMIT(pages) = 25600
STANDBY_SPOOL_PERCENT = 0
STANDBY_ERROR_TIME = NULL
PEER_WINDOW(seconds) = 120
PEER_WINDOW_END = 05/08/2023 15:06:29.000000 (1683569189)
READS_ON_STANDBY_ENABLED = N
HADR_LAST_TAKEOVER_TIME = NULL
"
8 - Perform a failback to locate the HADR roles back to their original state.
On the standby (old primary) node issue the db2 takeover hadr on db command.
Prior to starting the fix pack installation process, verify that the original primary node is the PRIMARY and verify that the HADR pair is still in PEER state via the db2pd -hadr db command.
"
db2tsa1@suse15-machine1:~> db2 takeover hadr on db tsadb
DB20000I The TAKEOVER HADR ON DATABASE command completed successfully.
Checking the Db version and if connect is working:
db2tsa1@suse15-machine1:~> db2 connect to tsadb
Database Connection Information
Database server = DB2/LINUXX8664 11.5.8.0
SQL authorization ID = DB2TSA1
Local database alias = TSADB
db2tsa1@suse15-machine1:~> db2 "select * from sysibm.SYSVERSIONS"
VERSIONNUMBER VERSION_TIMESTAMP AUTHID VERSIONBUILDLEVEL
------------- -------------------------- -------------------------------------------------------------------------------------------------------------------------------- ------------------------------
11050501 2023-05-05-16.21.28.992821 DB2TSA1 s2103171200
1 record(s) selected.
The database itself remains in v 11.5.5.1.
To upgrade the database/catalog, the db2updv command must be run.
- running db2updv from the primary node:
db2tsa1@suse15-machine1:~> db2 terminate
DB20000I The TERMINATE command completed successfully.
db2tsa1@suse15-machine1:~> db2updv115 -d tsadb
_________________________________________________________________________
_____ DB2 Service Tools _____
I B M
db2updv115
This tool is a service utility designed to update a DB2 Version 11.5
database to the current fix pack level.
_________________________________________________________________________
DB2 Universal Database Version 11.5, 5622-044 (c) Copyright IBM Corp. 2019
Licensed Material - Program Property of IBM
IBM DATABASE 2 Database update to current fix pack tool
db2updv115 completed successfully for database 'tsadb'.
"
9 - TSA domain migration is only required if the new Db2 fix pack includes a new TSA version. It is not always the case that the new Db2 fix pack includes a new TSA version.
TSA domain migration is required if the active version number (AVN) does not match the installed version number (IVN). These values can be listed by running the lssrc -ls IBM.RecoveryRM |grep VN command.
To migrate TSA domain, issue the following command as root:
export CT_MANAGEMENT_SCOPE=2
runact -c IBM.PeerDomain CompleteMigration Options=0
samctrl -m // Type 'Y' to confirm migration
"
- checking if AVN and IVN matches:
db2tsa1@suse15-machine1:~> lssrc -ls IBM.RecoveryRM |grep VN
Our IVN : 4.1.0.7
Our AVN : 4.1.0.7
Our CVN : 0000003bb22c9dc5 (0000003b)
Those match.
"
10 - Verify that MixedVersions is set to No for the cluster manager by running the lsrpdomain command.
"
db2tsa1@suse15-machine1:~> lsrpdomain
Name OpState RSCTActiveVersion MixedVersions TSPort GSPort
tsa-hadr-domain Online 3.2.6.2 No 12347 12348
No MixedVersions.
- Checking if everything is ok at the lssam:
db2tsa1@suse15-machine1:~> lssam
Online IBM.ResourceGroup:db2_db2tsa1_db2tsa1_TSADB-rg Nominal=Online
|- Online IBM.Application:db2_db2tsa1_db2tsa1_TSADB-rs
|- Online IBM.Application:db2_db2tsa1_db2tsa1_TSADB-rs:suse15-machine1
'- Offline IBM.Application:db2_db2tsa1_db2tsa1_TSADB-rs:suse15-machine2
'- Online IBM.ServiceIP:db2ip_192_168_42_131-rs
|- Online IBM.ServiceIP:db2ip_192_168_42_131-rs:suse15-machine1
'- Offline IBM.ServiceIP:db2ip_192_168_42_131-rs:suse15-machine2
Online IBM.ResourceGroup:db2_db2tsa1_suse15-machine1_0-rg Nominal=Online
'- Online IBM.Application:db2_db2tsa1_suse15-machine1_0-rs
'- Online IBM.Application:db2_db2tsa1_suse15-machine1_0-rs:suse15-machine1
Online IBM.ResourceGroup:db2_db2tsa1_suse15-machine2_0-rg Nominal=Online
'- Online IBM.Application:db2_db2tsa1_suse15-machine2_0-rs
'- Online IBM.Application:db2_db2tsa1_suse15-machine2_0-rs:suse15-machine2
Online IBM.Equivalency:db2_db2tsa1_db2tsa1_TSADB-rg_group-equ
|- Online IBM.PeerNode:suse15-machine1:suse15-machine1
'- Online IBM.PeerNode:suse15-machine2:suse15-machine2
Online IBM.Equivalency:db2_db2tsa1_suse15-machine1_0-rg_group-equ
'- Online IBM.PeerNode:suse15-machine1:suse15-machine1
Online IBM.Equivalency:db2_db2tsa1_suse15-machine2_0-rg_group-equ
'- Online IBM.PeerNode:suse15-machine2:suse15-machine2
Online IBM.Equivalency:db2_public_network_0
|- Online IBM.NetworkInterface:eth0:suse15-machine1
'- Online IBM.NetworkInterface:eth0:suse15-machine2
Now, let's go tho the post FixPack installation that is running the binds.
Check the documentation in the Reference (in the end of this documentation) for details and see the binds necessary for your environment.
db2 connect to tsadb
db2 "BIND /new/home/db2tsa1/sqllib/bnd/db2schema.bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE"
db2 "BIND /new/home/db2tsa1/sqllib/bnd/@db2ubind.lst BLOCKING ALL GRANT PUBLIC ACTION ADD"
db2 "BIND /new/home/db2tsa1/sqllib/bnd/@db2cli.lst BLOCKING ALL GRANT PUBLIC ACTION ADD"
db2 "BIND /new/home/db2tsa1/sqllib/bnd/@ddcsmvs.lst BLOCKING ALL SQLERROR CONTINUE GRANT PUBLIC ACTION ADD"
db2 "bind /new/home/db2tsa1/sqllib/bnd/@applycs.lst isolation cs blocking all grant public"
db2 "bind /new/home/db2tsa1/sqllib/bnd/@applyur.lst isolation ur blocking all grant public"
db2 "bind /new/home/db2tsa1/sqllib/bnd/db2dsproc.bnd blocking all grant public"
db2 "bind /new/home/db2tsa1/sqllib/bnd/db2stats.bnd blocking all grant public"
Done!
Applying rolling updates to a TSA-managed Db2 high availability disaster recovery (HADR) environment https://www.ibm.com/docs/en/db2/11.5?topic=pm-applying-rolling-updates-tsa-managed-hadr-db2-instance
After installing a fix pack
https://www.ibm.com/docs/en/db2/11.5?topic=environments-after-installing-fix-pack
Post-installation tasks for fix packs (Linux and UNIX)
https://www.ibm.com/docs/en/db2/11.5?topic=pack-post-installation-tasks-linux-unix
Binding bind files after installing fix packs
https://www.ibm.com/docs/en/db2/11.5?topic=pack-binding-bind-files-after-installing-fix-packs
Optional: Binding the Apply program packages (Linux, UNIX, Windows)
https://www.ibm.com/docs/en/idr/11.4.0?topic=surpluw-optional-binding-apply-program-packages-linux-unix-windows