We have set up RAC database on server. We can connect to database from sqlplus on the server using SCAN address. However, if I try to connect to RAC using SQL developer from client machine using SCAN address-based TNS entry, it shows the error
12-APR-2016 22:33:07 * (CONNECT_DATA=(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=User))(SERVICE_NAME=racdb)) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.227.110)(PORT=63694)) * establish * racdb * 12516 TNS-12516: TNS:listener could not find available handler with matching protocol stack
Client machine is behind the firewall. Here is the TNS entry.
RACDB = (DESCRIPTION = (LOAD_BALANCE = ON) (FAILOVER = ON) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.149)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.150)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.151)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = racdb) ) )
We cannot use DNS to resolve SCAN IPs from client side, so we used the IP address on the client machine. And IP addresses of SCAN are converted on client side using NAT. Below is their real addresses set on the server
# SCAN #192.168.227.149 racdb-scan.esplink.mn racdb-scan #192.168.227.150 racdb-scan.esplink.mn racdb-scan #192.168.227.151 racdb-scan.esplink.mn racdb-scan
If we change the IP address of TNS entry to VIP addresses, the connection is successful and I can connect to RAC database.
Is it wrong to use SCAN addresses to connect to RAC?