Upgrading by re-initializing HADR deployments
You can disable HADR to upgrade the Db2 or Db2 Warehouse primary and standby database instances and re-enabling it.
Before you begin
You must stop and disable HADR on your primary and standby database instances:
- On the primary and standby database instances, run the following command from the Db2 engine pod
to stop HADR:
manage_hadr -stop - On the primary HADR database instances, Exec into the Db2 engine pod and remove the /mnt/blumeta0/home/db2inst1/governor/db2.yml to ensure that automation does not detect it as an HADR instance.
- If you have configured HADR using a Db2uHADR custom resource (CR), then run the following
command to delete the CR:
oc delete db2uhadr <db2uhadr instance name>
Transition standby database instances to Active state:
- On the standby database instances, Exec into the Db2
engine pod and run the following
command:
su - db2inst1 -c "db2 rollforward db <DBNAME> complete" - On the standby database instances, Exec into the Db2
engine pod and run the following
command:
su - db2inst1 -c "db2 connect to <DBNAME>
Procedure
Note: If your deployment uses the restricted-v2 SCC, commands that require switching users or
elevated privileges are not supported. Perform all steps as the Db2 instance user within the
container. For more information, see Deploying Db2 or Db2
Warehouse with non-root deployment.