Monday, May 13, 2013

ORA-12203: TNS:unable to connect to destination

Cause: Invalid address specified or destination is not listening. This error can also occur because of underlying network or network transport problems.

Action: Verify that the net service name you entered was correct.Verify that the ADDRESS portion of the connect descriptor which corresponds to the net service name is correct. Ensure that the destination process (for example the listener) is running at the remote node.

Ensure your listener are configuration like this.

[oracle@OEL64BN1 ~]$ cat /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
i# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = orcl)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
      (SID_NAME = orcl)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dbserver1)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle


[oracle@OEL64BN1 ~]$

In SID_LIST_LISTENER You have to ensure all of SID are listed which you want to access. [ If SID are not listed listener will use all of SID running in this host ]

Check Your tnsnames.ora (Location =/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora ) file is correct like as

ORCL=
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dbserver1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )


The ORA-12203 can be the result of an invalid TNS address. In an attempt to eliminate the TNS-12203, verify that the service name is correct and that the name of the host computer defined as part of the TNS address is also valid and correct.
Obviously the other problem, as stated in the Oracle documentation about ORA-12203, the destination may not be not listening. Eliminating the TNS-12203 may involve insuring that the listener is running at the remote node. If the listener service is not running, does not exist and the database has just been newly created on the machine by restoring it from a backup, the listener service will need to be created in order to resolve the ORA-12203.


$ORACLE_HOME/network/log
For resolving an TNS-12203 error, the database alert log may also be a good resource to make sure the database is actually starting. 

Also, it is important to note that if you are experiencing ORA-12203 in newer versions of Oracle, you may be experiencing the brunt of an Oracle bug.

No comments:

Post a Comment