The high availability disaster recovery (HADR) feature
provides a high availability solution for both
partial and complete site failures. HADR protects against data loss by
replicating data changes from the primary database (source), to one or more standby
A partial site failure can be
caused by a hardware, network, or software failure. Without HADR, a partial
site failure requires restarting the database management system (DBMS) server
that contains the database. The length of time that it takes to restart the
database and the server where it is located is unpredictable. It may take
several minutes before the database is brought back to a consistent state and
made available. With HADR, a standby database will
assume control in seconds. In addition, the system can redirect the clients
that used the original primary database to the new primary database by using
automatic client reroute or retry logic in the application.
A complete site failure will
occur when a disaster, such as fire, causes the entire site to be destroyed.
For example, the primary database may be located at your primary data center in
one city, and a standby database might be located at your second data center in
another city. If a disaster occurs at the primary site, data availability is maintained by having the remote
standby database take over as the primary database with full DB2® functionality.
After a takeover operation occurs, one can bring the original primary database
back up and return it to its primary database status; this is known as failback. One can initiate a
failback if one can make the old primary database consistent with the new
primary database. After reintegration of the old primary database into the HADR
setup as a standby database, one can switch the roles of the databases to
enable the original primary database to once again be the primary database.
With HADR, the level of
protection from potential loss of data is based on configuration and topology
choices. Some of the key choices will now be detailed:
What level of
synchronization will one use?
Standby databases are
synchronized with the primary database through log data that is generated on
the primary and shipped to the standbys. The standbys constantly roll forward
through the logs. One can choose from four different synchronization modes. In order
of most to least protection, these modes are SYNC, NEARSYNC, ASYNC, and
Will one use a peer
The peer window feature specifies
that the primary and standby databases are to behave as though they are still
in peer state for a configured amount of time if the primary loses the HADR
connection in peer state. If primary fails in peer or this "disconnected
peer" state, the failover to standby will have zero data loss. This
feature provides the greatest protection.
How many standbys
will one deploy?
With HADR, one can use either
single standby mode or multiple standby mode. With multiple standbys, a user can
achieve both high availability and disaster
recovery objectives with a single technology