Oracle tns Pinging error

1.3k views Asked by At

I have oracle 11g express edition installed on my laptop during installation i kept tns port no as 1530 .. now when i fire tnsping 1530 on cmd prompt it gives me C:\Users\SAI>tnsping 1530 TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production on 21-DEC- 014 18:34:58 Copyright (c) 1997, 2010, Oracle. All rights reserved. Used parameter files: C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora Used HOSTNAME adapter to resolve the alias Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROT COL=TCP)(HOST=0.0.5.250)(PORT=1521))) TNS-12543: TNS:destination host unreachable

and when i see the services in task manger its OracleServicesXe on 1912 and OracleXeClrAgent on 6852. I want to develop JEE application in Eclipse and Tomcat as web server , Please help me ..Thanx in advance

1

There are 1 answers

0
Sylvain Leroux On

From your output:

...
(HOST=0.0.5.250)(PORT=1521)
      ^^^^^^^^^

This "IP" is in fact 1530 expressed as dotted decimal notation...


Given your use case, the syntax for tnsping that you are looking for is probably something like:

tnsping <hostname>:<port>/<sid>

Here is an example on my test system at home, using Oracle 11g XE:

sylvain@grolem:~$ tnsping localhost:1521/xe

TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 21-DEC-2014 18:19:53

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

Used parameter files:

Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=xe))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
OK (20 msec)