问题描述:

开发人员报告,用myeclipse连接oracle后,过一段时间,连接断开,报ORA-03135错误。

问题挖掘:

用pl/sql和sqlplus连接oracle,也存在该问题,确定该问题与连接方式无关。

查看服务器,发现没有防火墙,防火墙因素排除。

ping -t 服务器地址,发现没有丢包,都100%收到,网络通畅。

基本可以肯定问题出在oracle参数配置上。但也不排除其他因素。

解决过程:

根据ora-03135查询到oracle官方的解决方案:

ORA-03135: connection lost contact

Cause:1) Server unexpectedly terminated or was forced to terminate. 2) Server timed out the connection.

Action:1) Check if the server session was terminated. 2) Check if the timeout parameters are set properly in sqlnet.ora.

查询相关资料,发现该问题可能与sqlnet.ora设置参数SQLNET.EXPIRE_TIME 有关。因此在server上面的sqlnet.ora设置参数SQLNET.EXPIRE_TIME = 5(需在服务器监听reload一下使参数生效:lsnrctl reload),而在client不设置该参数,。等待一段时间后,没有出现该问题了,问题解决。

知识扩展:

在server端的sqlnet.ora文件中设置SQLNET.EXPIRE_TIME这一参数可以启用DCD功能,DCD是Dead Connection Detection的缩写,用于检查死掉但没有断开的session。

DCD可以用于防止防火墙的timeout。

当新连接建立的时候,会读取sqlnet.ora中的这一设定,当20分钟间隔到达时,对inactive的session发送”probe” SQL*NET packet来确认client是否活着。如果已经死掉,那么相对应的resource会被自动清除。

如果client和server中间有防火墙,防火墙设有timeout参数,例如设置为一个小时,当一个小时中client和server间没有数据传输的时候,防火墙会断开连接。开启DCD后,通过设置SQLNET.EXPIRE_TIME的值小于防火墙的timeout参数可以避免这一情况。“probe” package确保防火墙不会断开idle的session。

参考资料:

sqlnet.orahttp://www.orafaq.com/wiki/Sqlnet.ora

oracle DCD  http://www.dbafan.com/blog/?p=174

sqlnet.expire_time and IDLE_TIME http://space.itpub.net/10687595/viewspace-420407

SQLNET.EXPIRE_TIME 的官方说明

Purpose

Use parameterSQLNET.EXPIRE_TIMEto specify a the time interval, in minutes, to send a probe to verify that client/server connections are active. Setting a value greater than 0 ensures that connections are not left open indefinitely, due to an abnormal client termination. If the probe finds a terminated connection, or a connection that is no longer in use, it returns an error, causing the server process to exit. This parameter is primarily intended for the database server, which typically handles multiple connections at any one time.

Limitations on using this terminated connection detection feature are:

·It is not allowed on bequeathed connections.

·Though very small, a probe packet generates additional traffic that may downgrade network performance.

·Depending on which operating system is in use, the server may need to perform additional processing to distinguish the connection probing event from other events that occur. This can also result in degraded network performance.

Default

0

Minimum Value

0

Recommended Value

10

Example

SQLNET.EXPIRE_TIME=10

例如:

SQLNET.EXPIRE_TIME = 20

可以设置为任意数值,单位分钟。

Oracle报错ora03135,(转)连接到oracle10g,报ORA-03135异常相关推荐

  1. Windows server 2012R2 设置文件共享目录报错:无法连接到C$管理共享已验证文件夹xxx在计算机xxx上是否存在

    Windows server 2012R2 设置文件共享目录报错:无法连接到C$管理共享已验证文件夹xxx在计算机xxx上是否存在 问题描述: Windows server 2012R2 机器,在安装 ...

  2. eas报错日记_EAS新建数据中心报错

    EAS新建数据中心报错,用的是oracle数据库. 报错明细: 错误原因: 数据中心类异常 解决方案: 请将如下错误信息提单反馈 [com.kingdee.eas.tools.admin.framew ...

  3. android 地图定位报错,百度地图定位迷之报错(latitude : 4.9E-324 lontitude : 4.9E-324)

    估计很多小伙伴们在开发的时候会用到定位和地图功能,用的最多的应该是百度地图和高德地图,这两天我在使用百度地图定位的时候碰到了许多迷之bug,简直迷得不要不要的,把自己碰到的问题记下来,给自己一个记录, ...

  4. [ 报错记录 ]使用springboot时@Runwith报红

    只有菜鸟才会有的报错 比如我 问题描述 : @Runwith报红 尝试方法 : 反复导依赖没有用 有效方法 : @Runwith 改成 @RunWith w要大写 !!!

  5. PLB配置:PLB中新建负载均衡-新增server,点击“保存”,页面报错:介质包上传失败。后台异常:com.primeton.appserver.common.exception.BaseExcep

    [问题描述] PLB V6中新建负载均衡-新增server,点击"保存",页面报错:介质包上传失败.后台异常:com.primeton.appserver.common.excep ...

  6. mysql load报错_mysql:执行LOAD DATA LOCAL 报错

    mysql:执行LOAD DATA LOCAL 报错. 我使用navicat for mysql 连接 mysql服务器执行local 可以正常执行 . show VARIABLES like  '% ...

  7. jsp里写java代码报错,jsp里写java代码报错

    jsp里写java代码报错 [2021-02-11 06:42:03]  简介: php去除nbsp的方法:首先创建一个PHP代码示例文件:然后通过"preg_replace("/ ...

  8. mysql修改路径报错_mysql修改数据存储路径报错处理

    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' 解决?: >>> vim ...

  9. server 2008 mysql 报错 0xc000007b_docker插件部署项目,volumes报错invalid volume specification...

    关于idea使用docker插件部署项目,volumes报错invalid volume specification 观察volumes那行,没写错的.但是........ 使用docker-comp ...

最新文章

  1. idea中如何打开RunDashboard窗口,微服务最实用设置
  2. C++:求极值的 min_element、max_element和minmax_element算法
  3. 网管日志-06.08.14
  4. 深入Oracle的left join中on和where的区别详解
  5. JBoss Portal CAS 的配置
  6. 优点 spark_spark(一)
  7. iOS学习笔记37 时间和日期计算
  8. SparkShell中提交任务java.net.ConnectException: Call From henu4/192.168.248.244 to henu2:9000 failed on co
  9. 【精华总结】全文4000字、20个案例详解Pandas当中的数据统计分析与排序
  10. python默认采用什么字符编码_Python01.2.字符编码-输入输出
  11. mysql 字符串函数
  12. 【BZOJ】1176: [Balkan2007]Mokia(cdq分治)
  13. Qt QScrollArea 用法 QScrollArea不显示 QScrollArea没铺满
  14. 粒子群优化算法及其应用
  15. 南阳oj 28 大数阶乘
  16. uploadify上传文件在360浏览器急速模式下失败
  17. 十大知识领域 5大管理过程 47个子过程
  18. OpenCV实践小项目(二) -文档ocr扫描识别
  19. Webpack 常用知识点总结
  20. 千手观音背后:最残酷的残疾经历

热门文章

  1. Windows CE.net 应用开发(教程)----基础篇
  2. 快速接入腾讯TUIKaraoke在线 K 歌场景
  3. tex 编译问题汇总
  4. 兼容Vista 赛门铁克公测新杀毒软件
  5. 多无人机(UAV)协同任务分配
  6. 一加3t刷机后还卡_一加3T变砖之后如何自救?一加3T线刷救砖教程详解
  7. 高压功率放大器ATA4051VS高压功率放大器HSA4051
  8. html程序员表白前端网页源码
  9. 自动控制原理——绪论
  10. 16代表啥_十六型人格的四个字母分别代表了什么含义?