0

我在安装过程中在我的笔记本电脑上安装了 oracle 11g express edition 我将 tns 端口号保持为 1530 .. 现在当我在 cmd 提示符下启动 tnsping 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

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

4

1 回答 1

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)
于 2014-12-21T17:13:40.510 回答