My Oracle Support Banner

NAT or Network Address Translator & RAC: Recommendation for Using CMAN or Connection Manager (Doc ID 2476150.1)

Last updated on APRIL 22, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Information in this document applies to any platform.

Goal

Remote client connections to either SCAN or VIP listeners using a NAT or Network translated address are very slow or timeout.

TNSPings to the same address may be ok.

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 08-11
2018 13:31:06

Copyright (c) 1997, 2010, Oracle. All rights reserved.

Using parameter file:
D:\app\user001\product\11.2.0\client_2\network\admin\sqlnet.ora

Trying to connect (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.198)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.199)(PORT = 152
1)) (LOAD_BALANCE = yes))(CONNECT_DATA =(SERVER = DEDICATED) (SERVICE_NAME = pat
db)))
OK (325 ms)

MYDB =
  (DESCRIPTION =
   (ADDRESS_LIST =
       (ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.198)(PORT = 1521))
       (ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.199)(PORT = 1521)))
           (CONNECT_DATA =(SERVER = DEDICATED)
                (SERVICE_NAME = MYDB.domain.com)))

Using a single SCAN host in the TNS connect string would yield the same result:

MYDB_SCAN =
    (DESCRIPTION =
       (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST =SCAN_HOST)(PORT = 1521)))
                  (CONNECT_DATA =(SERVER = DEDICATED) (SERVICE_NAME = MYDB.domain.com)))

SQL> conn <username>/<password>@MYDB
    ERROR:     ORA-12170: TNS:Connect timeout occurred

===================================

However, attempting to connect using a specific instance name or SID does not exhiibit this problem:

MYDB =
    (DESCRIPTION =
      (ADDRESS_LIST =
           (ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.198)(PORT = 1521))
           (ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.199)(PORT = 1521)))
               (CONNECT_DATA =(SERVER = DEDICATED)
                    (SERVICE_NAME = MYDB.domain.com)(INSTANCE_NAME=mdb1)))<===Specify INSTANCE_NAME here.

Alternatively using the SID in (CONNECT_DATA=..) does NOT exhibit this problem:

mydb1 = (DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.198)(PORT = 1521))(CONNECT_DATA=(sid=mydb1)))

mydb2 = (DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.199)(PORT = 1521))(CONNECT_DATA= (sid=mydb2)))

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.