Stopping Db2 High Availability Disaster Recovery (HADR)
If you are using the Db2 High Availability Disaster Recovery (HADR) feature, stopping HADR operations to perform maintenance on the primary or standby databases might be necessary. Stop HADR operations only on the database that you are performing maintenance. To stop using HADR completely, stop HADR on both databases.
About this task
Warning: If you want to stop the specified database but you still want
it to maintain its role as either an HADR primary or standby database, do not issue the STOP HADR
command. If you issue the STOP HADR command the database will become a standard
database and might require reinitialization in order to resume operations as an HADR database.
Instead, issue the DEACTIVATE DATABASE command.
During upgrade to Db2 Version 11.1, the
STOP HADR command can be issued on a Db2 Version 10.5 Fix Pack
7 or later database to change the database role to standard and to complete the upgrade process as a
non-HADR database. To learn more, see Dealing with failures
while upgrading Db2 servers in HADR
environments (Version 10.5 Fix Pack 7 or later). If for some reason the standby database is no longer required or there is an issue with the primary database the STOP HADR command can be issued on the standby database.
For an active standby database,
an error message is returned. For a deactivated standby database, the HADR role is changed to
STANDARD and the database is placed into rollforward pending. Issue the ROLLFOWARD DATABASE
command with the STOP option to get the database out of rollforward
pending state and then issue the UPGRADE DATABASE command to complete the upgrade
process.
Note: If there is an issue with the standby database the STOP HADR
command can be issued on the primary database. This changes the role to STANDARD and the
UPGRADE DATABASE command can be issued to complete the upgrade process as a
non-HADR database.
If you issue the STOP HADR command against a standard database, an error will be returned.
Procedure
To stop HADR operations on the primary or standby database: