DB2 Version 9.7 for Linux, UNIX, and Windows

STOP HADR command

Stops HADR operations for a database.

Authorization

One of the following:

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 diagram
>>-STOP HADR ON--+-DATABASE-+--database-alias------------------->
                 '-DB-------'                   

>--+--------------------------------------+--------------------><
   '-USER--user-name--+-----------------+-'   
                      '-USING--password-'     

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.