Changing HADR synchronization modes
Synchronization modes determine how primary logs are propagated and synchronized with the standby database when the systems are in peer state. The stricter the synchronization mode, the more influenced the performance on the primary database. There are three synchronization modes: SYNC
, NEARSYNC
, and ASYNC
.
Getting ready
In this recipe, we will switch first to NEARSYNC
mode, then to SYNC
synchronization mode, and then back to ASYNC
mode.
The HADR_SYNCMODE
parameter mentioned previously controls the synchronization mode of HADR. Since this parameter is not dynamic after any modification, a HADR and database restart is needed.
How to do it...
The parameter HADR_SYNCMODE
is not dynamic, so every change to the synchronization mode requires a database restart for both the primary database and standby database.
Changing to NEARSYNC synchronization mode
Change the value of
HADR_SYNCMODE
, on both the databases, toNEARSYNC
synchronization mode:[db2inst1@nodedb22 ~]...