日期:2014-05-16  浏览次数:20367 次

郁闷的TNS-12560
今天碰到一件比较蹊跷郁闷的事情,操作系统装好,数据库装好,并升级至10.2.0.4。主机版本为
引用
主机名:           HZMC-13E8D6B47E
OS 名称:          Microsoft(R) Windows(R) Server 2003, Enterprise Edition
OS 版本:          5.2.3790 Service Pack 2 Build 3790

据同事反应安装升级期间一切正常,未报任何错误。装好进行数据库测试,发现在本地端连接数据库一直挂在那里。sqlplus "sys/oracle@orcl as sysdba"。检查了listener.ora,sqlnet.ora都没问题,动用了我所知道的一切技能(比如换端口,换监听名字,换静态注册,重配监听,换网卡等等),错误依旧。在sqlnet.log中报如下错误,这个错误太没个性了,网上一查,一大堆无用资料。。。
引用
***********************************************************************
Fatal NI connect error 12560, connecting to:
(LOCAL=NO)

  VERSION INFORMATION:
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.4.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 10.2.0.4.0 - Production
  Time: 29-11月-2010 16:21:41
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12560
    TNS-12560: TNS: 协议适配器错误
    ns secondary err code: 0
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0

在listener.log中有显示我的客户端ip连接
引用
29-11月-2010 15:07:32 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=services)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169870336)) * services * 0
29-11月-2010 15:08:46 * (CONNECT_DATA=(SERVER=DEDICATED)(SID=orcl)(CID=(PROGRAM=D:\oracle\product\10.2.0\db_1\bin\sqlplus.exe)(HOST=DBCOOKER-PC)(USER=Administrator))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.16.4.168)(PORT=50608)) * establish * orcl * 0
不再监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.4.173)(PORT=1521)))

打开客户端跟踪,似乎也正常
引用
[29-11月-2010 15:48:39:187] --- TRACE CONFIGURATION INFORMATION FOLLOWS ---
[29-11月-2010 15:48:39:187] New trace stream is D:\oracle\product\10.2.0\db_1\network\ADMIN\client_7680_1.trc
[29-11月-2010 15:48:39:187] New trace level is 16
[29-11月-2010 15:48:39:187] --- TRACE CONFIGURATION INFORMATION ENDS ---
[29-11月-2010 15:48:39:187] --- PARAMETER SOURCE INFORMATION FOLLOWS ---
[29-11月-2010 15:48:39:187] Attempted load of system pfile source D:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
[29-11月-2010 15:48:39:187] Parameter source loaded successfully
[29-11月-2010 15:48:39:187]
[29-11月-2010 15:48:39:188] Attempted load of local pfile source D:\sqlnet.ora
[29-11月-2010 15:48:39:188] Parameter source was not loaded
[29-11月-2010 15:48:39:188]
[29-11月-2010 15:48:39:188]  -> PARAMETER TABLE LOAD RESULTS FOLLOW <-
[29-11月-2010 15:48:39:188] Successful parameter table load
[29-11月-2010 15:48:39:188]  -> PARAMETER TABLE HAS THE FOLLOWING CONTENTS <-
[29-11月-2010 15:48:39:188]   TRACE_LEVEL_CLIENT = 16
[29-11月-2010 15:48:39:188]   trace_directory_client = D:\oracle\product\10.2.0\db_1\network\ADMIN
[29-11月-2010 15:48:39:188]   SQLNET.AUTHENTICATION_SERVICES = (NTS)
[29-11月-2010 15:48:39:188]   TRACE_FILE_CLIENT = CLIENT
[29-11月-2010 15:48:39:188] --- PARAMETER SOURCE INFORMATION ENDS ---
[29-11月-2010 15:48:39:188] --- LOG CONFIGURATION INFORMATION FOLLOWS ---
[29-11月-2010 15:48:39:188] Log stream will be "D:\sqlnet.log"
[29-11月-2010 15:48:39:188] Log stream validation not requested
[29-11月-2010 15:48:39:188] --- LOG CONFIGURATION INFORMATION ENDS ---

[29-11月-2010 15:48:39:188] nlst