Data Guard - Changing IP Addresses
When changing IP of a host we should update/recheck the following places:
- /etc/hosts or DNS
- listener.ora
- tnsnames.ora
- Database parameters (local_listener, remote_listener)
- Data Guard configuration
This document is also relevant when changing the IP address of
the connection between the hosts, other than the original IP addresses we used during
the installation.
When installation is done using the hostname and not the IP
address, most of the changes are not relevant except for /etc/hosts.
In this document, I will describe how to change the Data
Guard Broker configuration.
Dataguard configuration
Show the environment
DGMGRL> show configurationShow detailed information of the Primary
Configuration - dr
Protection Mode: MaxAvailability
Members:
pdb7 - Primary database
fdb7 - Far sync instance
sdb7 - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 351 seconds ago)
DGMGRL> show database pdb7 StaticConnectIdentifierSince there is an old IP in the configuration we must change it
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.15.1.60)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=pdb7_DGMGRL)(INSTANCE_NAME=pdb7)(SERVER=DEDICATED)))'
DGMGRL> edit database pdb7 set property StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.15.2.112)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=pdb7_DGMGRL)(INSTANCE_NAME=pdb7)(SERVER=DEDICATED)))';I recommend to do the same change with hostname instead of the IP address
Property "staticconnectidentifier" updated
DGMGRL> edit database pdb7 set property StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=e15lfs2)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=pdb7_DGMGRL)(INSTANCE_NAME=pdb7)(SERVER=DEDICATED)))';Show detailed information of the Standby
Property "staticconnectidentifier" updated
DGMGRL> show database sdb7 StaticConnectIdentifierThis configuration has a hostname and not an IP address, so we don't need to change anything in the Standby.
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=e15rfs2.axxana.local)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sdb7_DGMGRL)(INSTANCE_NAME=sdb7)(SERVER=DEDICATED)))'
DGMGRL> show far_sync fdb7 StaticConnectIdentifierWe don't need to change the Far Sync configuration because it is not being used.
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.15.1.63)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=fdb7_DGMGRL)(INSTANCE_NAME=fdb7)(SERVER=DEDICATED)))';
DGMGRL> edit far_sync fdb7 set property StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.15.2.111)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=fdb7_DGMGRL)(INSTANCE_NAME=fdb7)(SERVER=DEDICATED)))';The reason:
Error: ORA-16831: operation not allowed on this member
Failed.
- If you use a TNS alias for the StaticConnectIdentifier, you can change the alias definition like you may already be doing for DGConnectIdentifier.
- The StaticConnectIdentifier is only used by the broker to remotely start an instance. This is required for switchover, convert, and reinstatement of the old primary to a physical standby after a failover. The StaticConnectIdentifier property is not used for a Far Sync instance as there's never any need for the broker to restart it.
A comment I got from Oracle's Software Development Director:
ReplyDelete"
- If you use a TNS alias for the StaticConnectIdentifier, you can change the alias definition like you may already be doing for DGConnectIdentifier.
- The StaticConnectIdentifier is only used by the broker to remotely start an instance. This is required for switchover, convert, and reinstatement of the old primary to a physical standby after a failover. The StaticConnectIdentifier property is not used for a Far Sync Instance as there's never any need for the broker to restart it.
"