Accessing a Standby System like Oracle Dataguard or Dbvisit Standby via Transparent Application Failover (TAF) is a standard approach. It works well. Without any obvious hints.

But what, if the customer tells you, that the clients used are only able to work with one SINGLE IP ADDRESS? And if there are hundreds of devices. What do you do, in case of a switch- or failover? Reconfigure all of them within minutes?

First idea: rename the new primary system (including the IP) to the one used by all devices. But, no, this is not a good idea. In case of a switchover one would have to change the whole setup of the standby definition. What a hassle!

The solution: change your basic architecture and use the Oracle Remote Listener Option!

How does it work?

First let“™s define the setup: we have two machines working as a Primary/Standby system. Let“™s call them „M-A“ and „M-B“ for machine A and machine B respectively.

Here is, where a third machine (could be a virtual machine or the machine where your e.g. Cloud Control resides) comes into play. Let“™s call it „M-RL“ for machine RemoteListener.

On this machine we have to install the Oracle software. No, not the full stack, „only“ the Clusterware (This is for the sake of being license compliant. With this type of installation no extra license is needed!).

Now this machine „M-RL“ has to have the name and IP of the machine all client devices access. This machine just works as kind of a relay. It routes all requests to the actual primary database running on „M-A“ or „M-B“.

So how is the setup done? Easy!

On the remote listener machine „M-RL“ the following line has to be added to listener.ora and the listener process has to be restarted:

REGISTRATION_INVITED_NODES_LISTENER=(M-A,M-B)

On both primary/standby machine one parameter has to be added or changed:

 

ALTER SYSTEM SET REMOTE_LISTENER = "(ADDRESS=(PROTOCOL=TCP)(HOST=M-RL)(PORT=1521))";

And here is a sample tnsnames.ora entry:

orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = M-RL)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)

 

That“™s it! The only command that has to be added to a switchover, is to stop the listener on the new standby machine.

OK, I have to admit, this is a very technical article. But in case you have devices, that only know of ONE IP address, this is a feasible and easy solution.

As always, comments are very welcome!

Alle Beiträge von Rainier Kaczmarczyk

Seit 35 Jahren mit Oracle zu Gange... Ich startete damals mit Version 5.0 Nun: Immer noch mit Oracle beschäftigt. Zudem: Dbvisit (Hochverfügbarkeit). Ein Dbvisit Evangelist.

2 Kommentare

  1. Hey, this article is gold! Just trying to find a solution on using same IP address for both standby/primary without a clue. Do you have any documentation on this that you could share? Appreciate you help! Regards!

  2. Dear Alex,

    first of all: thank you for „the flowers“. We are just one community trying to solve the problems of our customers. So I appreciate all comments.

    Basically the setup having a Primary/Standby system should be clear. Yes. Technically we have a startup database trigger, a service and an according tnsnames.ora entry.

    For most configurations this works. But indeed, I have a customer, who has hundreds (where do you know that from?…) of mobile devices. So we just tried the Remote Listener Option. But unfortunately it did not work. Sorry to say so. No idea why. Maybe, cause they are still on 12.1.

    Will let you know, if I have more ideas/solutions.

    KR Rainier

    PS: unavailable until 12.6.2023

Schreibe einen Kommentar