又折腾了一上午了,又发现新问题了;
新手真痛苦啊昨天的一台机器能成功配置 ,今天公司的服务器上不行了;配置文件如下:# listener.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = orcl)
      (ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
    )
  )
)LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    (DESCRIPTION =
      (ADDRESS_LIST =
(ADDRESS = (PROTOCOL =TCP)(HOST =192.168.5.100)(PORT=1521))
      )
    )
  )# tnsnames.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
  (DESCRIPTION = 
    (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.5.100)(PORT =1521))
    )
    (CONNECT_DATA =
      (SERVER=DEDICATED) 
      (SID=orcl)
    )
  )
 
C:\>tnsping orcl
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 14-2月 -
2012 12:16:39Copyright (c) 1997, 2010, Oracle.  All rights reserved.已使用的参数文件:
D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
尝试连接 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.5.100)(PORT =
 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (10 毫秒)
C:\>lsnrctl status

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 14-2月 -2012 12:1
7:18Copyright (c) 1991, 2010, Oracle.  All rights reserved.正在连接到 (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER 的 STATUS
------------------------
别名                      LISTENER
版本                      TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Produ
ction
启动日期                  14-2月 -2012 12:10:42
正常运行时间              0 天 0 小时 6 分 36 秒
跟踪级别                  off
安全性                    ON: Local OS Authentication
SNMP                      OFF
监听程序参数文件          D:\app\Administrator\product\11.2.0\dbhome_1\network\a
dmin\listener.ora
监听程序日志文件          d:\app\administrator\diag\tnslsnr\hb\listener\alert\lo
g.xml
监听端点概要...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hb)(PORT=1521)))
服务摘要..
服务 "orcl" 包含 1 个实例。
  实例 "orcl", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
服务 "orcl.wx.hbsoft.zj" 包含 1 个实例。
  实例 "orcl", 状态 READY, 包含此服务的 1 个处理程序...
服务 "orclXDB.wx.hbsoft.zj" 包含 1 个实例。
  实例 "orcl", 状态 READY, 包含此服务的 1 个处理程序...
命令执行成功C:\>

解决方案 »

  1.   

    参考这篇博文:http://blog.csdn.net/luiseradl/article/details/7064916
      

  2.   

    在ORACLE 服务器本机,可以直接连接成功 ;C:\>sqlplus system/SQL@orcl
    SQL*Plus: Release 11.2.0.1.0 Production on 星期二 2月 14 13:40:09 2012Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    连接到:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing optionsSQL>
    ----------
    网络上某台机器连接,错误如下:C:\>sqlplus system/SQL@orclSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 14 13:42:03 2012Copyright (c) 1982, 2010, Oracle.  All rights reserved.ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    Enter user-name:难道本地也要配置 tnsname.ora  ???