Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12543: TNS:destination host unreachable

user12167361Apr 27 2013 — edited Apr 27 2013
Dear All,

I installed database and client on different OEL 6.3 box. While connecting through client to database, I am getting following error,

Machine 2 (Has client) (Hostname - test.otm63app) (IP - 192.168.56.3),

[oracle@test ~]$ sqlplus 'sysdba@otm63db'
SQL*Plus: Release 11.2.0.1.0 Production on Sun Apr 28 01:38:37 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.

Enter password:
ERROR:
ORA-12543: TNS:destination host unreachable

Enter user-name: sysdba
Enter password:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified

Enter user-name: sysdba
Enter password:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQLPlus*

Given below is the output of tnsping,

[oracle@test ~]$ tnsping otm63db
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 28-APR-2013 01:41:13
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
/data/app/oracle/product/11.2.0/client_1/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = test.otm63db)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = otm63db)))
TNS-12543: TNS:destination host unreachable

Given below text of,

*[oracle@test admin]$ cat sqlnet.ora*
# sqlnet.ora Network Configuration File: /data/app/oracle/product/11.2.0/client_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

ADR_BASE = /data/app/oracle

*[oracle@test admin]$ cat tnsnames.ora*
otm63db =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = test.otm63db)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = otm63db)
)
)

Given below is,

[oracle@test ~]$ cat /etc/hosts
192.168.56.3 test.otm63app
192.168.56.2 test.otm63db

Given below is ping to DB,

[oracle@test ~]$ ping test.otm63db
PING test.otm63db (192.168.56.2) 56(84) bytes of data.
64 bytes from test.otm63db (192.168.56.2): icmp_seq=1 ttl=64 time=0.824 ms
64 bytes from test.otm63db (192.168.56.2): icmp_seq=2 ttl=64 time=1.34 ms
64 bytes from test.otm63db (192.168.56.2): icmp_seq=3 ttl=64 time=0.626 ms
64 bytes from test.otm63db (192.168.56.2): icmp_seq=4 ttl=64 time=1.50 ms
64 bytes from test.otm63db (192.168.56.2): icmp_seq=5 ttl=64 time=2.14 ms
64 bytes from test.otm63db (192.168.56.2): icmp_seq=6 ttl=64 time=0.672 ms
--- test.otm63db ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5220ms
rtt min/avg/max/mdev = 0.626/1.184/2.144/0.541 ms

Machine 1 (Has database) (Hostname - test.otm63db) (IP - 192.168.56.2),

*[oracle@test ~]$ cat /etc/hosts*
192.168.56.2 test.otm63db
127.0.0.1 localhost
192.168.56.3 test.otm63app

*[oracle@test ~]$ cat /data/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora*
# listener.ora Network Configuration File: /data/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

ADR_BASE_OTM63DB = /data/app/oracle

OTM63DB =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = test.otm63db)(PORT = 1521))
)
)

*[oracle@test ~]$ cat /data/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora*
# tnsnames.ora Network Configuration File: /data/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

OTM63DB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = test.otm63db)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = otm63db)
)
)

Please help me to resolve this error.

Thanks,
This post has been answered by sb92075 on Apr 27 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2013
Added on Apr 27 2013
2 comments
4,910 views