Thursday, 9 August 2012

Error: ORA-12545 while trying to connect using SCAN from the Oracle Client in Oracle 11gR2

While trying to connect from Oracle Client using the SCAN IP we are receiving the Error.

Enter user-name: system/manager@coltdb01-scan.test.exp:1521/sendb.test.exp

ORA-12545: Connect failed because target host or object does not exist

Steps to troubleshoot

1. check whether you are able to "ping" and "nslookup" the SCAN name from Client host. nslookup should resolve the SCAN ips

2. Check whether you have set your REMOTE_LISTENER correctly. In 11gR2 it should point to your SCAN name
    remote_listener                      string      coltdb01-scan:1521

3. Check your LOCAL_LISTENER parameter. It is very important, that you point your VIP correctly
    local_listener         (DESCRIPTION=(ADDRESS_LIST=(AD

     Try to connect using the VIP name and  VIP IP address from the client instead of SCAN. If you are not able to connect using the VIP name and able to connect using the VIP IP address,
     make sure to change the local_listener value as below

    local_listener           (DESCRIPTION=(ADDRESS_LIST=(AD

4. Make sure all your listener are online using following commands

   [oracle@coltdb01 admin]$ $GRID_HOME/bin/srvctl config scan
   [oracle@coltdb01 admin]$ $GRID_HOME/bin/srvctl config scan_listener
   [oracle@coltdb01 admin]$ $GRID_HOME/bin/crsctl stat res -w "TYPE = ora.scan_listener.type"
   [oracle@coltdb01 admin]$$GRID_HOME/bin/lsnrctl status LISTENER_SCAN1  ( Make sure you set the ORACLE_HOME env variable to GRID_HOME)
   [oracle@coltdb01 admin]$$GRID_HOME/bin/lsnrctl service LISTENER_SCAN1

My issue was fixed when I modified my local_listener to include the VIP IP address because the Oracle client was not able resolve the VIP name

Enter user-name: system/manager@coltdb01-scan.test.exp:1521/sendb.test.exp

Connected to:
Oracle Database 11g Enterprise Edition Release - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
Data Mining and Real Application Testing options

The reason is that the SCAN listener is only a front to the local listeners on each node. Once the SCAN interface determines what node to send you to it will basically change the connect string to the connect string of the local listener. The value of the local listener host for some reasons get from "local_listener" database initialisation parameter. By default you can have VIP adresses without domain name. If your DNS does not resolve nodes shortnames (which is quite common) SCAN does not know where is the node hosts and raise "ORA-12545: Connect failed because target host or object does not exist".

1 comment:

  1. This is really helpful information in resolving day to day connection issue. Thanks Senthil.