今天有人报告连接oracle 数据库及其缓慢,我测试了一下大约要1分钟左右。

查看alert_orcl.log,有大量的这样的错误:

Fatal NI connect error 12537, connecting to:
 (LOCAL=NO)

  VERSION INFORMATION:
 TNS for Linux: Version 11.2.0.1.0 - Production
 Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
 TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
  Time: 29-AUG-2012 13:08:34
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12537
   
TNS-12537: TNS:connection closed
    ns secondary err code: 12560
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
opiodr aborting process unknown ospid (8275) as a result of ORA-609
Wed Aug 29 13:08:54 2012


Fatal NI connect error 12547, connecting to:
 (LOCAL=NO)

  VERSION INFORMATION:
 TNS for Linux: Version 11.2.0.1.0 - Production
 Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
 TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
  Time: 29-AUG-2012 12:41:39
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12547
   
TNS-12547: TNS:lost contact
    ns secondary err code: 12560
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
opiodr aborting process unknown ospid (7787) as a result of ORA-609
Wed Aug 29 12:41:59 2012

 

尝试一:

Sqlnet.ora: SQLNET.INBOUND_CONNECT_TIMEOUT=180
Listener.ora: INBOUND_CONNECT_TIMEOUT_listener_name=120

然后listener reload,虽然这样的错误少了,但是登录依然缓慢

最终解决:

原来是我当时用数据库服务器查资料,设置了2个DNS,而其中一个DNS是错的,这在看网页时没问题,但是数据库连接的时候就去搜索DNS去了,导致的时间很长,直接把这2个DNS删除,使用本地的host文件来解析,连接又很快了。

Logo

更多推荐