天天看點

Ora-12535錯誤的處理

原因:

⒈網絡不通

⒉用戶端和伺服器之間有防火牆

我的問題出在伺服器的防火牆,xp自帶的防火牆,隻要在防火牆的例外添加1521斷口規則就可以了

首先,ping資料庫伺服器的ip,通,實體鍊路上沒有問題,

C:/>ping 192.168.0.55

Pinging 192.168.0.55 with 32 bytes of data:

Reply from 192.168.0.55: bytes=32 time<1ms TTL=128

Reply from 192.168.0.55: bytes=32 time<1ms TTL=128

Reply from 192.168.0.55: bytes=32 time<1ms TTL=128

Reply from 192.168.0.55: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.0.55:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 0ms, Average = 0ms

檢視本機通信

C:/>ping 192.168.0.55

Pinging 192.168.0.55 with 32 bytes of data:

Reply from 192.168.0.55: bytes=32 time<1ms TTL=128

Reply from 192.168.0.55: bytes=32 time<1ms TTL=128

Reply from 192.168.0.55: bytes=32 time<1ms TTL=128

Reply from 192.168.0.55: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.0.55:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:/>netstat -an

Active Connections

  Proto  Local Address          Foreign Address        State

  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING

  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING

  TCP    0.0.0.0:1046           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:1110           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:1521           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:1925           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:1929           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:3260           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:3261           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:4400           0.0.0.0:0              LISTENING

  TCP    0.0.0.0:19780          0.0.0.0:0              LISTENING

  TCP    127.0.0.1:1030         0.0.0.0:0              LISTENING

  TCP    127.0.0.1:1030         127.0.0.1:1031         ESTABLISHED

  TCP    127.0.0.1:1031         127.0.0.1:1030         ESTABLISHED

  TCP    127.0.0.1:1034         0.0.0.0:0              LISTENING

  TCP    127.0.0.1:1087         127.0.0.1:1110         CLOSE_WAIT

  TCP    127.0.0.1:1110         127.0.0.1:1132         TIME_WAIT

  TCP    127.0.0.1:1110         127.0.0.1:3118         ESTABLISHED

  TCP    127.0.0.1:1110         127.0.0.1:3143         ESTABLISHED

  TCP    127.0.0.1:1110         127.0.0.1:3766         ESTABLISHED

  TCP    127.0.0.1:1110         127.0.0.1:4513         ESTABLISHED

  TCP    127.0.0.1:1117         127.0.0.1:1110         TIME_WAIT

  TCP    127.0.0.1:1125         127.0.0.1:1110         CLOSE_WAIT

  TCP    127.0.0.1:1892         127.0.0.1:1110         CLOSE_WAIT

  TCP    127.0.0.1:3118         127.0.0.1:1110         ESTABLISHED

  TCP    127.0.0.1:3143         127.0.0.1:1110         ESTABLISHED

  TCP    127.0.0.1:3766         127.0.0.1:1110         ESTABLISHED

  TCP    127.0.0.1:3998         127.0.0.1:1110         CLOSE_WAIT

  TCP    127.0.0.1:4105         127.0.0.1:1110         CLOSE_WAIT

  TCP    127.0.0.1:4115         127.0.0.1:1110         CLOSE_WAIT

  TCP    127.0.0.1:4169         127.0.0.1:1110         CLOSE_WAIT

  TCP    127.0.0.1:4458         127.0.0.1:1110         CLOSE_WAIT

  TCP    127.0.0.1:4513         127.0.0.1:1110         ESTABLISHED

  TCP    127.0.0.1:4623         127.0.0.1:1110         CLOSE_WAIT

 察看監聽器

C:/>lsnrctl status

LSNRCTL for 32-bit Windows: Version 9.0.1.1.1 - Production on 16-7月 -2008 15:27

:13

Copyright (c) 1991, 2001, Oracle Corporation.  All rights reserved.

正在連接配接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zhu)(PORT=1521)))

LISTENER 的 STATUS

------------------------

别名                      LISTENER

版本                      TNSLSNR for 32-bit Windows: Version 9.0.1.1.1 - Produc

tion

啟動日期                  16-7月 -2008 08:22:32

正常運作時間              0 天 7 小時 4 分 41 秒

跟蹤級别                  off

安全性                    OFF

SNMP                      OFF

監聽器參數檔案          d:/oracle/ora90/network/admin/listener.ora

監聽器日志檔案          d:/oracle/ora90/network/log/listener.log

監聽端點概要...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=zhu)(PORT=1521)))

服務摘要..

服務 "PLSExtProc" 包含 1 個例程。

  例程 "PLSExtProc", 狀态 UNKNOWN, 包含此服務的 1 個處理程式...

指令執行成功

TNSping    TNS解析

C:/>tnsping orcl

TNS Ping Utility for 32-bit Windows: Version 9.0.1.1.1 - Production on 16-7月 -2

008 15:33:05

Copyright (c) 1997 Oracle Corporation.  All rights reserved.

已使用的參數檔案:

d:/oracle/ora90/network/admin/sqlnet.ora

d:/oracle/ora90/network/admin/tnsnames.ora

已使用 TNSNAMES 擴充卡來解析别名

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

(HOST = 192.168.0.55)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = ORCL)))

TNS-12535: TNS: 操作逾時

解析不成功,TNS。

Sql*plus

SQL> conn system/[email protected]

ERROR:

ORA-12535: TNS: 操作逾時

警告: 您不再連接配接到 ORACLE。

SQL>

在伺服器上找到sqlnet.log

位置:oracle_home/Db_1/network/log/sqlnet

***********************************************************************

Fatal NI connect error 12638, connecting to:

 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))

  VERSION INFORMATION:

       TNS for 32-bit Windows: Version 10.1.0.2.0 - Production

       Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.1.0.2.0 - Production

  Time: 15-7月 -2008 15:22:21

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12638

    TNS-12638: Credential retrieval failed

    ns secondary err code: 0

    nt main err code: 0

    nt secondary err code: 0

nt OS err code: 0

确定問題出在TNS上,就可以檢視具體是在防火牆屏蔽了1521還是IP被人改過

★查找問題時候發現用

lsnrctl status

指令可以知道機器運作多久了。

這是一片更細的處理這個問題的方法,我隻經曆這一種障礙也緊談談自己的處理方法

http://hi.baidu.com/snoworld/blog/item/d339b3354270558aa61e12f7.html