Stop and start a Db2® instance
inside a container to perform maintenance tasks.
About this task
Db2
Warehouse 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
-
Exec into the Db2 Warehouse pod with catalog partition.
-
Temporarily disable the built-in HA:
sudo wvcli system disable -m "Disable HA before Db2 maintenance"
-
Become the Db2 instance
owner:
-
Run the db2stop command and perform the maintenance tasks that you
want.
-
When the maintenance tasks are completed, restart Db2 with the db2start command,
and activate the database (for example, with the command
db2 activate db
BLUDB
).
-
As the root user, re-enable the built-in HA monitoring:
sudo wvcli system enable -m "Enable HA after Db2 maintenance"
-
Confirm that the built-in HA monitoring is active:
sudo wvcli system status
sudo wvcli system devices
Tip: You might have to run these commands several times before the HA status is shown as
active.