3

I have successfully connected to my 12c database using Oracle 8 client. The connection is based on using the database-scan as host in tnsnames.ora.

There are 3 IP addresses reserved in DNS for scan...

However I read in oracle documentation that:

If using a pre-11g Release 2 client (Oracle Database 11g Release or Oracle Database 10g Rel. 2, or older) you will not fully benefit from the advantages of SCAN. Reason: The Oracle Client will not be able to handle a set of three IPs returned by the DNS for SCAN. Hence, it will try to connect to only the first address returned in the list and will more or less ignore the others. If the SCAN Listener listening on this specific IP is not available or the IP itself is not available, the connection will fail. In order to ensure load balancing and connection failover with pre-11g Release 2 clients, you will need to change the TNSNAMES.ora of the client so that it would use 3 address lines, where each address line resolves to one of the SCAN VIPs.

...so even though my application is connecting it might not be running optimally and using only 1 IP address in the SCAN.

My questions are:

What would cause the SCAN listener listening on this IP to be unavailable? How likely is it to happen?

What would cause the SCAN IP to be unavailable? How likely is this to happen?

1 Answer 1

1

You are citing the Oracle Whitepaper Oracle Single Client Access Name (SCAN), June 2013, page 12p. If on a DNS server three addresses in a round robin system are configured for the scan listener then the Oracle client will get these three addresses in a random order if it resolves the name by the DNS server. It will use one of these addresses to start a connection to the database server, if this will not work it will fail over to a different address and if this will still will not work it will try the third address. If this also fails it will give up. But this works only for a 11.2 or higher client. An older client will only try the first IP address. If this does not work it will gave up immediately. But if you force the client to connect again, it may get a triple of IP addresses in a different order and then it may succeed if the first IP address is a working one.

You can over come this problem if you define the connect string in the following way (this example is from the Oracle document cited above)

sales.example.com =(DESCRIPTION=
(ADDRESS_LIST= (LOAD_BALANCE=on)(FAILOVER=ON)
(ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.192)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.193)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.194)(PORT=1521)))
 (CONNECT_DATA=(SERVICE_NAME= salesservice.example.com)))

"LOAD_BALANCE=on" means that the client will select an IP address at random to connect to the database scan listener. "FAILOVER=ON" means that the client will try a different other addresses, too, if the connection fails for an address.

A client does not know on which of the database hosts a scan listener address is up. But he does not need this information because all scan lsitener have the same knowledge about the services of the cluster and a scan listener will forward the client to the appropriate local listener and finally the client will connect to the local listener of the appropriate node.

If the listener is not running on a scan listener address, which will rarely happen, this does not have an impact on the clients that are already connected to a database. It may only affect clients that want to connect now in the way as described above.

The reason why a scan listener IP is not reachable can be that you switch it to a different hos or you restart it for whatever reason or it crashes or could not brought up for the cluster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.