ORA-12170引发的ORA-3136所导致的数据库问题

来源:互联网 发布:软件测试相关证书 编辑:程序博客网 时间:2024/06/17 03:09

环境:

ORACLE RDBMS Version: 11.1.0.6.0 + Windows 2003

问题描述:

109号,长假归来第一天,公司开发库数据库无法进入,当时没有查看日志文件,也没看ora-报错号,直接重启数据库了(这次解决问题的方法不正确!)。

1012号上午830到公司又发现数据库无法登陆,登陆报ORA-3136错误。下定决心查看到底什么问题。

解决过程:

重启后启动数据库,打开日志文件,11g的日志文件存放与10g又不一样,有一个参数diagnostic_dest控制,定位该日志文件,发现在9号与12号之间有大量重复的报错信息:

Fatal NI connect error 12170.

 

  VERSION INFORMATION:

          TNS for 32-bit Windows: Version 11.1.0.6.0 - Production

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

          Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 11.1.0.6.0 - Production

  Time: 09-10-2009 08:55:20

  Tracing not turned on.

  Tns error struct:

    ns main err code: 12535

   

TNS-12535: TNS: 操作超时

    ns secondary err code: 12606

    nt main err code: 0

    nt secondary err code: 0

    nt OS err code: 0

  Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.8)(PORT=3208))

WARNING: inbound connection timed out (ORA-3136)

Fri Oct 09 08:55:23 2009

Completed: alter database open

Fri Oct 09 08:55:36 2009

 

网上查看相关资料,是和网络连接相关的错误,metalink提出的解决方案是:

1.    set INBOUND_CONNECT_TIMEOUT_<listenername>=0 in listener.ora

2.    set SQLNET.INBOUND_CONNECT_TIMEOUT = 0 in sqlnet.ora of server.

 

 

其中修改listenerinbound_connect_timeout参数的方法有二种(我采用的第一种方式):

 

第一种:

 

C:/>lsnrctl

 

LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 12-10-2009 10:1

6:57

 

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

 

欢迎来到LSNRCTL, 请键入"help"以获得信息。

 

LSNRCTL> help

以下操作可用

星号 (*) 表示修改符或扩展命令:

 

start               stop                status

services            version             reload

save_config         trace               change_password

quit                exit                set*

show*

 

LSNRCTL> show

 show之后提供了以下操作

星号 (*) 表示修改符或扩展命令:

 

rawmode                     displaymode

rules                       trc_file

trc_directory               trc_level

log_file                    log_directory

log_status                  current_listener

inbound_connect_timeout     startup_waittime

snmp_visible                save_config_on_stop

dynamic_registration

 

LSNRCTL> show inbound_connect_timeout

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

LISTENER 参数 "inbound_connect_timeout" 设为 60

命令执行成功

LSNRCTL> set inbound_connect_timeout 0

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

LISTENER 参数 "inbound_connect_timeout" 设为 0

命令执行成功

LSNRCTL> show inbound_connect_timeout

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

LISTENER 参数 "inbound_connect_timeout" 设为 0

命令执行成功

LSNRCTL> set save_config_on_stop on   #指定在一个lsnrctl会话期内所发生的修改在退出时是否应该被保存起来,下次监听启动也是生效的  on 保存 off 不保存

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

LISTENER 参数 "save_config_on_stop" 设为 ON

命令执行成功

LSNRCTL> exit

 

第二种:

修改listener.ora文件,加入:  INBOUND_CONNECT_TIMEOUT_LISTENER_NAME=0

 

 

修改好了,过几天再查看下有没有该问题存在,(*^__^*)…嘻嘻

 

 

网上资料:

Oracle10gR2 ORA-3136 错误解决http://www.eygle.com/archives/2006/07/sqlnet_inbound_connect_timeout.html

http://blog.chinaunix.net/u1/50863/showart_410003.html

ORA-12518: TNS: 监听程序无法分发客户机

http://www.itpub.net/viewthread.php?tid=521086&extra=&page=1

lsnrctl 使用详解

http://hi.baidu.com/gaobonm/blog/item/b5c383821acd0eb66c8119d8.html

 

相关参数说明:

INBOUND_CONNECT_TIMEOUT

Use the INBOUND_CONNECT_TIMEOUT parameter to specify how long the Oracle Connection Manager listener waits for a valid connection from a client or another instance of Oracle Connection Manager. This parameter accepts the following values:

60 (default) to disable the timeout

n>0 to enable the timeout, where n equals the timeout period in seconds

 

 

SQLNET.INBOUND_CONNECT_TIMEOUT parameter in sqlnet.ora on the database server

Specify the time, in seconds, for a client to connect with the database server and provide the necessary authentication information.

If the client fails to establish a connection and complete authentication in the time specified, then the database server terminates the connection. In addition, the database server logs the IP address of the client and an ORA-12170: TNS:Connect timeout occurred error message to the sqlnet.log file. The client receives either an ORA-12547: TNS:lost contact or an ORA-12637: Packet receive failed error message.

 

原创粉丝点击