It's possible to successfully connect to the 'first' of the two Databases (2 Server) in failover mode, but when shutting down the first instance it's not possible to connect to the second and getting an ORA-12545.
Specifying the IP addresses in the TNSNAMES.ORA for the 2 Servers, for example:
failover =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 10.20.30.15)
(PORT = 1521)
)
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 10.20.30.18)
(PORT = 1521)
)
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVICE_NAME = failover)
(SERVER = dedicated)
(FAILOVER_MODE =
(TYPE = select)
(METHOD = basic)
(RETRIES = 180)
(DELAY = 5)
)
)
(FAILOVER = yes)
)
So, we have
Server_1 on 10.20.30.15 and
Server_2 on 10.20.30.18.
It appears that when Oracle wants to load balance or failover it must send the request back to the client to redirect the connection by specifying the new host name. As the host name is not specified in the HOSTS file then the new connection fails.
With DNS names resolution it's not necessary to have the IP-entries in the hosts file, but If you specify the IP adresses in the TNSNAMES.ORA please add the 2 entries of the Servers to the hosts file on your client to be able to redirect the connection.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center