Oracle tns Pinging错误

时间:2014-12-21 16:05:04

标签: oracle tns tnsping

我在安装过程中安装了我的笔记本电脑上安装了oracle 11g快速版本我保持tns端口号为1530 ..现在当我在cmd提示符下触发1530时它给了我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

当我看到任务管理器中的服务时它的Oracle服务在1912年和OracleXeClrAgent在6852.我想在Eclipse和Tomcat中开发JEE应用程序作为Web服务器,请帮助我..提前提前

1 个答案:

答案 0 :(得分:1)

从你的输出:

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

这" IP"实际上是1530,用点分十进制表示法表示...


根据您的用例,您正在寻找的tnsping语法可能类似于:

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

以下是我家测试系统的一个示例,使用的是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)