Stop and start a Db2 instance inside a container to perform maintenance
tasks.
About this task
Db2 comes with a built-in High Availability (HA) solution that monitors and
triggers recovery actions if there is a problem with Db2 database services. The
built-in HA monitoring must be temporarily disabled before you stop and start Db2.
Procedure
-
Run the exec command on the Db2 pod. For more information, see Exec into the Db2 pod.
-
Run the following command to temporarily disable the built-in HA:
wvcli system disable -m "Disable HA before Db2 maintenance"
-
Switch to the Db2 instance owner:
-
Run the following command and perform the maintenance tasks that you want.
-
Restart Db2 with the following command.
- Activate the database when the maintenance tasks are completed with the following
command.
-
Re-enable the built-in HA monitoring:
wvcli system enable -m "Enable HA after Db2 maintenance"
-
Confirm that the built-in HA monitoring is active:
wvcli system status
Tip: You might have to run these commands several times before the HA status is shown as
active.