Data Guard – Changing IP Addresses

Data Guard – Changing IP Addresses

 

 

 

 

 

Hi, When changing IP address of a host, we should update/recheck the following places:

/etc/hosts or DNS

  1. listener.ora
  2. tnsnames.ora
  3. Database parameters (local_listener, remote_listener)
  4. 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.

Data Guard Configuration

Show the environment.

DGMGRL> show configuration
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)

Show detailed information of the Primary.

DGMGRL> show database pdb7 StaticConnectIdentifier
  StaticConnectIdentifier = ‘(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.15.1.60)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=pdb7_DGMGRL)(INSTANCE_NAME=pdb7)(SERVER=DEDICATED)))’

Since there is an old IP in the configuration, we must change it.

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)))’;
Property “staticconnectidentifier” updated

I recommend making the same change with the hostname instead of the IP address.

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)))’;
Property “staticconnectidentifier” updated

Show detailed information of the Standby.

DGMGRL> show database sdb7 StaticConnectIdentifier
StaticConnectIdentifier = ‘(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=e15rfs2.axxana.local)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sdb7_DGMGRL)(INSTANCE_NAME=sdb7)(SERVER=DEDICATED)))’

This configuration has a hostname and not an IP address, so we don’t need to change anything in the Standby.

DGMGRL> show far_sync fdb7 StaticConnectIdentifierStaticConnectIdentifier = ‘(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.15.1.63)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=fdb7_DGMGRL)(INSTANCE_NAME=fdb7)(SERVER=DEDICATED)))’;

We don’t need to change the Far Sync configuration because it is not being used.

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)))’;
Error: ORA-16831: operation not allowed on this member
Failed
.

The reason:

– 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.

Please feel free to comment here or contact me by email:
Yossi.Nixon@Axxana.com or Twitter @YossiNixon

Yossi Nixon
Chief Database Architect