STOP HADR command

The STOP HADR command stops HADR operations for a database. This is a cluster-wide command in a Db2® pureScale® environment, so you can issue it on any member, including non-replay members on the standby database.

Authorization

One of the following authorities:

  • SYSADM
  • SYSCTRL
  • SYSMAINT

Required connection

Instance. The command establishes a database connection if one does not exist, and closes the database connection when the command completes.

Command syntax

Read syntax diagramSkip visual syntax diagramSTOP HADR ON DATABASEDB database-alias USERuser-nameUSINGpassword

Command parameters

DATABASE database-alias
Identifies the database on which HADR operations are to stop.
USER user-name
Identifies the user name under which the HADR operations are to be stopped.
USING password
The password used to authenticate user-name.

Usage notes

The following table shows database behavior in various conditions:

Database status Behavior upon STOP HADR command
Inactive standard database Error message returned.
Active standard database Error message returned.
Inactive primary database Database role changes to standard. Database configuration parameter hadr_db_role is updated to STANDARD. Database remains offline. At the next restart, enters standard role.
Active primary database Stops shipping logs to the HADR standby database and shuts down all HADR EDUs on the HADR primary database. Database role changes to standard and database remains online. Database remains in standard role until an explicit START HADR command with the AS PRIMARY option is issued. Open sessions and transactions are not affected by the STOP HADR command. You can repeatedly issue STOP HADR and START HADR commands while the database remains online. These commands take effect dynamically.
Inactive standby database Database role changes to standard. Database configuration parameter hadr_db_role is updated to STANDARD. Database remains offline. Database is put into rollforward pending mode.
Active standby database Error message returned: Deactivate the standby database before attempting to convert it to a standard database.

When issuing the STOP HADR command, the corresponding error codes might be generated: SQL1767N, SQL1769N, or SQL1770N with a reason code of 98. The reason code indicates that there is no installed license for HADR on the server where the command was issued. To correct the problem, install a valid HADR license using the db2licm or install a version of the server that contains a valid HADR license as part of its distribution.