After your multiple HADR standby setup is up and running,
you might want to make additional changes, such as adding or removing
auxiliary standby databases or changing the principal standby database
designation. You can make these kinds of modifications without causing
an outage on your primary database.
Adding auxiliary standbys
There are a few
reasons why you might want to add an auxiliary standby:
- To deploy an additional standby for processing read-only workloads
- To deploy an additional standby for time-delayed replay
- To deploy an additional standby for disaster recovery purposes
- To add a standby that was a part of a previously active HADR deployment
but was orphaned because the hadr_target_list configuration
parameter for the new primary does not specify that standby
You can add an auxiliary standby only if the
hadr_target_list configuration
parameter is already set on the primary and at least one standby.
To
add an auxiliary standby to your HADR deployment, update the target
list of the primary with the host and port information from the standby.
This information corresponds to the settings for the
hadr_local_host and
hadr_local_svc parameters
on the standby. You must also add the host and port information for
the primary to the target list of the new standby.
Tip: Although it is not required, a
best practice is to also add the host and port information for the
new standby to the target lists of the other standbys in the deployment.
You should also specify the host and port information for those standbys
in the target list of the new standby. If you do not make these additional
updates and one of the other standbys takes over as the new primary,
the new standby is rejected as a standby target and is shut down.
Removing auxiliary standbys
The only standbys
that you can remove dynamically are auxiliary standbys. If you dynamically
remove an auxiliary standby from your multiple standby deployment,
there is no effect on normal HADR operations on the primary and the
principal standby. To remove an auxiliary standby, issue the STOP
HADR command on the standby; afterward, you can remove it
from the target lists of the primary and any other standby.
Changing the principal standby
You can change
the principal standby only if you first stop HADR on the primary database;
this does not cause an outage, because you do not have to deactivate
the primary.
To change the principal standby, you must stop
HADR on the primary database. Then, update the target list of the
primary database to list the new principal standby first. If the new
principal standby is not already a standby, add the primary database's
address to its target list, configure the other HADR parameters, and
activate the standby. If it is already a standby, no action is needed.
Tip: Although it is not required, it
is a best practice to also add the host and port information for the
new principal standby to the target list of the other standby in the
deployment. You should also specify the host and port information
for that standby in the target list of the new principal standby.
If you do not make these additional updates and either one of the
standbys takes over as the new primary, the other standby is rejected
as a standby target and is shut down.